This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 885836bc49 remove outdated code from cqlsh
885836bc49 is described below

commit 885836bc492a09bba2f11cba3cddb7ab15a00dc1
Author: Brad Schoening <[email protected]>
AuthorDate: Tue Apr 5 16:10:00 2022 -0400

    remove outdated code from cqlsh
    
    Patch by Brad Schoening; reviewed by brandonwilliams and smiklosovic for
    CASSANDRA-17490
---
 CHANGES.txt  |  1 +
 bin/cqlsh.py | 27 ---------------------------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 28181195c5..865b108a41 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.1
+ * remove outdated code from cqlsh (CASSANDRA-17490)
  * remove support for deprecated version specific TLS in Python 3.6 
(CASSANDRA-17365)
  * Add support for IF EXISTS and IF NOT EXISTS in ALTER statements 
(CASSANDRA-16916)
  * resolve several pylint issues in cqlsh.py and pylib (CASSANDRA-17480)
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index 5476456bb1..c412d20ddf 100755
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -268,21 +268,6 @@ else:
 
 CQL_DIR = os.path.dirname(CONFIG_FILE)
 
-OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc'))
-if os.path.exists(OLD_CONFIG_FILE):
-    if os.path.exists(CONFIG_FILE):
-        print('\nWarning: cqlshrc config files were found at both the old 
location ({0})'
-              + ' and the new location ({1}), the old config file will not be 
migrated to the new'
-              + ' location, and the new location will be used for now.  You 
should manually'
-              + ' consolidate the config files at the new location and remove 
the old file.'
-              .format(OLD_CONFIG_FILE, CONFIG_FILE))
-    else:
-        os.rename(OLD_CONFIG_FILE, CONFIG_FILE)
-OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history'))
-if os.path.exists(OLD_HISTORY):
-    os.rename(OLD_HISTORY, HISTORY)
-# END history/config definition
-
 CQL_ERRORS = (
     cassandra.AlreadyExists, cassandra.AuthenticationFailed, 
cassandra.CoordinationFailure,
     cassandra.InvalidRequest, cassandra.Timeout, cassandra.Unauthorized, 
cassandra.OperationTimedOut,
@@ -550,11 +535,6 @@ class Shell(cmd.Cmd):
     def batch_mode(self):
         return not self.tty
 
-    @property
-    def is_using_utf8(self):
-        # utf8 encodings from https://docs.python.org/{2,3}/library/codecs.html
-        return self.encoding.replace('-', '_').lower() in ['utf', 'utf_8', 
'u8', 'utf8']
-
     def set_expanded_cql_version(self, ver):
         ver, vertuple = full_cql_version(ver)
         self.cql_version = ver
@@ -773,13 +753,6 @@ class Shell(cmd.Cmd):
 
         raise ObjectNotFound("'{}' not found in keyspace '{}'".format(name, 
ks))
 
-    def get_usertypes_meta(self):
-        data = self.session.execute("select * from system.schema_usertypes")
-        if not data:
-            return cql3handling.UserTypesMeta({})
-
-        return cql3handling.UserTypesMeta.from_layout(data)
-
     def get_trigger_names(self, ksname=None):
         if ksname is None:
             ksname = self.current_keyspace


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to