scylla-cqlsh 6.0.16__cp39-cp39-win32.whl → 6.0.18__cp39-cp39-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of scylla-cqlsh might be problematic. Click here for more details.

copyutil.cp39-win32.pyd CHANGED
Binary file
cqlsh/cqlsh.py CHANGED
@@ -48,11 +48,6 @@ UTF8 = 'utf-8'
48
48
 
49
49
  description = "CQL Shell for Apache Cassandra"
50
50
 
51
- try:
52
- from cqlshlib._version import __version__ as version
53
- except ImportError:
54
- version = "6.2.0"
55
-
56
51
  readline = None
57
52
  try:
58
53
  # check if tty first, cause readline doesn't check, and only cares
@@ -161,6 +156,10 @@ from cqlshlib.tracing import print_trace, print_trace_session
161
156
  from cqlshlib.util import get_file_encoding_bomsize
162
157
  from cqlshlib.util import is_file_secure, trim_if_present
163
158
 
159
+ try:
160
+ from cqlshlib._version import __version__ as version
161
+ except ImportError:
162
+ version = "0.0.0"
164
163
 
165
164
  DEFAULT_HOST = '127.0.0.1'
166
165
  DEFAULT_PORT = 9042
@@ -494,6 +493,8 @@ class Shell(cmd.Cmd):
494
493
  profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([self.hostname])
495
494
  kwargs['port'] = self.port
496
495
  kwargs['ssl_context'] = sslhandling.ssl_settings(hostname, CONFIG_FILE) if ssl else None
496
+ # workaround until driver would know not to lose the DNS names for `server_hostname`
497
+ kwargs['ssl_options'] = {'server_hostname': self.hostname} if ssl else None
497
498
  else:
498
499
  assert 'scylla' in DRIVER_NAME.lower(), f"{DRIVER_NAME} {DRIVER_VERSION} isn't supported by scylla_cloud"
499
500
  kwargs['scylla_cloud'] = cloudconf
@@ -2131,6 +2132,7 @@ class Shell(cmd.Cmd):
2131
2132
  kwargs['contact_points'] = (self.hostname,)
2132
2133
  kwargs['port'] = self.port
2133
2134
  kwargs['ssl_context'] = self.conn.ssl_context
2135
+ kwargs['ssl_options'] = self.conn.ssl_options
2134
2136
  if os.path.exists(self.hostname) and stat.S_ISSOCK(os.stat(self.hostname).st_mode):
2135
2137
  kwargs['load_balancing_policy'] = WhiteListRoundRobinPolicy([UnixSocketEndPoint(self.hostname)])
2136
2138
  else:
@@ -2421,7 +2423,8 @@ def read_options(cmdlineargs, environment):
2421
2423
  print("\nWarning: Password is found in an insecure cqlshrc file. The file is owned or readable by other users on the system.",
2422
2424
  end='', file=sys.stderr)
2423
2425
  print("\nNotice: Credentials in the cqlshrc file is deprecated and will be ignored in the future."
2424
- "\nPlease use a credentials file to specify the username and password.\n", file=sys.stderr)
2426
+ "\nPlease use a credentials file to specify the username and password.\n"
2427
+ "\nTo use basic authentication, place the username and password in the [PlainTextAuthProvider] section of the credentials file.\n", file=sys.stderr)
2425
2428
 
2426
2429
  optvalues = optparse.Values()
2427
2430
 
@@ -2493,7 +2496,7 @@ def read_options(cmdlineargs, environment):
2493
2496
  credentials.read(options.credentials)
2494
2497
 
2495
2498
  # use the username from credentials file but fallback to cqlshrc if username is absent from the command line parameters
2496
- options.username = username_from_cqlshrc
2499
+ options.username = option_with_default(credentials.get, 'plain_text_auth', 'username', username_from_cqlshrc)
2497
2500
 
2498
2501
  if not options.password:
2499
2502
  rawcredentials = configparser.RawConfigParser()
@@ -2501,7 +2504,6 @@ def read_options(cmdlineargs, environment):
2501
2504
 
2502
2505
  # handling password in the same way as username, priority cli > credentials > cqlshrc
2503
2506
  options.password = option_with_default(rawcredentials.get, 'plain_text_auth', 'password', password_from_cqlshrc)
2504
- options.password = password_from_cqlshrc
2505
2507
  elif not options.insecure_password_without_warning:
2506
2508
  print("\nWarning: Using a password on the command line interface can be insecure."
2507
2509
  "\nRecommendation: use the credentials file to securely provide the password.\n", file=sys.stderr)
cqlshlib/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '6.0.16'
16
- __version_tuple__ = version_tuple = (6, 0, 16)
15
+ __version__ = version = '6.0.18'
16
+ __version_tuple__ = version_tuple = (6, 0, 18)
cqlshlib/sslhandling.py CHANGED
@@ -58,6 +58,16 @@ def ssl_settings(host, config_file, env=os.environ):
58
58
  ssl_validate = get_option('ssl', 'validate')
59
59
  ssl_validate = ssl_validate is None or ssl_validate.lower() != 'false'
60
60
 
61
+ ssl_check_hostname = env.get('SSL_CHECK_HOSTNAME')
62
+ if ssl_check_hostname is None:
63
+ ssl_check_hostname = get_option('ssl', 'check_hostname')
64
+ ssl_check_hostname = ssl_check_hostname is not None and ssl_check_hostname.lower() != 'false'
65
+
66
+ if ssl_check_hostname and not ssl_validate:
67
+ sys.exit("SSL certificate hostname checking "
68
+ "(`check_hostname` in the [ssl] section) must be turned off "
69
+ "if certificate `validate` is turned off.")
70
+
61
71
  ssl_version_str = env.get('SSL_VERSION')
62
72
  if ssl_version_str is None:
63
73
  ssl_version_str = get_option('ssl', 'version')
@@ -85,9 +95,12 @@ def ssl_settings(host, config_file, env=os.environ):
85
95
  usercert = os.path.expanduser(usercert)
86
96
 
87
97
  ssl_context = ssl.SSLContext(ssl_version)
88
- ssl_context.check_hostname = ssl_validate
89
- ssl_context.load_cert_chain(certfile=usercert,
90
- keyfile=userkey)
98
+ ssl_context.check_hostname = ssl_check_hostname
99
+ if usercert and userkey:
100
+ ssl_context.load_cert_chain(certfile=usercert,
101
+ keyfile=userkey)
102
+ if (usercert and not userkey) or (userkey and not usercert):
103
+ print("Warning: userkey and usercert from [ssl] section, should be both configured, otherwise won't be used")
91
104
 
92
105
  ssl_context.verify_mode = ssl.CERT_REQUIRED if ssl_validate else ssl.CERT_NONE
93
106
  if ssl_certfile:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scylla-cqlsh
3
- Version: 6.0.16
3
+ Version: 6.0.18
4
4
  Summary: cqlsh is a Python-based command-line client for running CQL commands on a scylla cluster.
5
5
  Home-page: https://github.com/scylladb/scylla-cqlsh
6
6
  Author: Israel Fruchter
@@ -1,9 +1,9 @@
1
- copyutil.cp39-win32.pyd,sha256=PcHz7jlYbtXOWqspMmGQuACE-f9pP-YUrf7FFC9V8Vk,1065472
1
+ copyutil.cp39-win32.pyd,sha256=K9MLZZ-lNW5bFaGTT8R6pRugOTX43EifoW1Uu2HcG4E,1065472
2
2
  cqlsh/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
3
3
  cqlsh/__main__.py,sha256=x2NuvlSuAKwNCxiX07YoYfxog9JNAO759ZxnjBEcfus,231
4
- cqlsh/cqlsh.py,sha256=rsB67mN6-bxAk-OkU4TvCamhSyGxIE_gddY1Rd8snd8,114259
4
+ cqlsh/cqlsh.py,sha256=LZ78gWssBEuJJ6o-RdKN67TRS8kPfE-43FF0mZGmshc,114676
5
5
  cqlshlib/__init__.py,sha256=3M0IQCsjdCGYEOBT20swSvqxV6V8vg_mu1uJig78Vmk,3274
6
- cqlshlib/_version.py,sha256=0MZ9pE0ihI9iKYAkAM4JQg9TJH1oQ0o_WareBFn8tWk,429
6
+ cqlshlib/_version.py,sha256=HbqxcGIvjP7DeCK1ui2_Pi_9H2-nIg5bnhpk6NgzAGs,429
7
7
  cqlshlib/authproviderhandling.py,sha256=goFjJCO1FKuVCXU7KXlmlorx_cD_oIRlgpOeH13W--g,7254
8
8
  cqlshlib/copyutil.py,sha256=Pc4WaKg_W8IP4ZpuWEvoLOrJJGQTwRHTyOdqExfDro0,116171
9
9
  cqlshlib/cql3handling.py,sha256=7lwOXRGeDH-IDy2ENNJ3dbeP5o3LRmlonvIoO9rs6kw,59132
@@ -14,13 +14,13 @@ cqlshlib/formatting.py,sha256=-oKYKPHUH9o2GFUC8QPWs3cbDplJ6awn_Xw4uIMuIUg,23633
14
14
  cqlshlib/helptopics.py,sha256=Dh2qBHFWJHwkZyQKfC6Ma5o-grLix2uqnFba6UTYxVA,4714
15
15
  cqlshlib/pylexotron.py,sha256=YHThu6pk9kDNoTOuJTDdXBXbso7eQjmAWqh9qy4w5l0,19835
16
16
  cqlshlib/saferscanner.py,sha256=N5ugQIf-ZyJ8w8CtkY-6f8F8OpqgUSJgyMuusA4yWSM,3630
17
- cqlshlib/sslhandling.py,sha256=GaZ5Mc6skkwgz83CUWnkka6_Nk71Pag-pL-mA2Je9uU,4014
17
+ cqlshlib/sslhandling.py,sha256=XYdvON1WkWFQ5dg5ttpwpSQDgbqI58YJi8Lx1qTDtQA,4758
18
18
  cqlshlib/tracing.py,sha256=Krb-TkfWrUdxr17-2yZrW5DXKvBEQt-FYZAix_62Tes,3493
19
19
  cqlshlib/util.py,sha256=gHvzlTw1T9N1YzXdVPFptAt58EzyXpDRibAo8QB03I8,5240
20
20
  cqlshlib/wcwidth.py,sha256=zsoo9u3ZA3q8RL5Afb6ynRujqDdUZ9zlFIHGE8RkqyA,16244
21
- scylla_cqlsh-6.0.16.dist-info/LICENSE.txt,sha256=65AZdlqRQxiyMBv8nY6itMITk5jx9EkE_jHujbcDzbk,11564
22
- scylla_cqlsh-6.0.16.dist-info/METADATA,sha256=r3olDujB0GyBN-sJG0GsAnWdJhzAp4Z_fwSCqsNqaGU,2910
23
- scylla_cqlsh-6.0.16.dist-info/WHEEL,sha256=ox_whmEWdOvRyK6TeOPzEmRk4K2lM8LLVKChtBzmjZU,96
24
- scylla_cqlsh-6.0.16.dist-info/entry_points.txt,sha256=oE4unqgR3WwNkCJDGlMG1HYtCE3nEZZ4d9CIl-JSZyQ,46
25
- scylla_cqlsh-6.0.16.dist-info/top_level.txt,sha256=PVG-5w7PDG3FoAJH6Rq2I8C0y4cKa2KOW75GxjHkmQ4,24
26
- scylla_cqlsh-6.0.16.dist-info/RECORD,,
21
+ scylla_cqlsh-6.0.18.dist-info/LICENSE.txt,sha256=65AZdlqRQxiyMBv8nY6itMITk5jx9EkE_jHujbcDzbk,11564
22
+ scylla_cqlsh-6.0.18.dist-info/METADATA,sha256=6YpMyPFceo5HrZCNy_22nBkMKqMzjaPuoeqyu747Xf4,2910
23
+ scylla_cqlsh-6.0.18.dist-info/WHEEL,sha256=J4VEqyL9z1mLE9UmMSsP54FoLo18dqSe_E9pRPZ-IbI,96
24
+ scylla_cqlsh-6.0.18.dist-info/entry_points.txt,sha256=oE4unqgR3WwNkCJDGlMG1HYtCE3nEZZ4d9CIl-JSZyQ,46
25
+ scylla_cqlsh-6.0.18.dist-info/top_level.txt,sha256=PVG-5w7PDG3FoAJH6Rq2I8C0y4cKa2KOW75GxjHkmQ4,24
26
+ scylla_cqlsh-6.0.18.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp39-cp39-win32
5
5