ekaterinadimitrova2 commented on code in PR #2653:
URL: https://github.com/apache/cassandra/pull/2653#discussion_r1311841931
##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -277,22 +276,10 @@ def __repr__(self):
return '<%s %s>' % (self.__class__.__name__, self.message())
-def maybe_ensure_text(val):
- return str(val) if val else val
-
-
class FormatError(DecodeError):
verb = 'format'
-def full_cql_version(ver):
- while ver.count('.') < 2:
- ver += '.0'
- ver_parts = ver.split('-', 1) + ['']
- vertuple = tuple(list(map(int, ver_parts[0].split('.'))) + [ver_parts[1]])
- return ver, vertuple
Review Comment:
The old one was handling alpha beta versions; the new one will raise a
ValueError if I read it correctly.
##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -277,22 +276,10 @@ def __repr__(self):
return '<%s %s>' % (self.__class__.__name__, self.message())
-def maybe_ensure_text(val):
Review Comment:
Why was this check removed?
##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -2209,22 +2187,16 @@ def read_options(cmdlineargs, environment=os.environ):
else:
options.color = should_use_color()
- if options.cqlversion is not None:
- options.cqlversion, cqlvertup = full_cql_version(options.cqlversion)
- if cqlvertup[0] < 3:
- parser.error('%r is not a supported CQL version.' %
options.cqlversion)
Review Comment:
Why is this removed?
##########
pylib/cqlshlib/cqlshmain.py:
##########
@@ -2166,15 +2150,12 @@ def read_options(cmdlineargs, environment=os.environ):
print("\nWarning: Using a password on the command line interface can
be insecure."
"\nRecommendation: use the credentials file to securely provide
the password.\n", file=sys.stderr)
- # Make sure some user values read from the command line are in unicode
- options.execute = maybe_ensure_text(options.execute)
Review Comment:
Same questions as before
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]