scylla-cqlsh 6.0.14__cp311-cp311-macosx_10_9_x86_64.whl → 6.0.18__cp311-cp311-macosx_10_9_x86_64.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.cpython-311-darwin.so +0 -0
- cqlsh/cqlsh.py +21 -11
- cqlshlib/_version.py +2 -2
- cqlshlib/copyutil.py +5 -1
- cqlshlib/sslhandling.py +16 -3
- {scylla_cqlsh-6.0.14.dist-info → scylla_cqlsh-6.0.18.dist-info}/METADATA +1 -1
- {scylla_cqlsh-6.0.14.dist-info → scylla_cqlsh-6.0.18.dist-info}/RECORD +11 -11
- {scylla_cqlsh-6.0.14.dist-info → scylla_cqlsh-6.0.18.dist-info}/WHEEL +1 -1
- {scylla_cqlsh-6.0.14.dist-info → scylla_cqlsh-6.0.18.dist-info}/LICENSE.txt +0 -0
- {scylla_cqlsh-6.0.14.dist-info → scylla_cqlsh-6.0.18.dist-info}/entry_points.txt +0 -0
- {scylla_cqlsh-6.0.14.dist-info → scylla_cqlsh-6.0.18.dist-info}/top_level.txt +0 -0
copyutil.cpython-311-darwin.so
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
|
|
@@ -135,6 +130,7 @@ except ImportError as e:
|
|
|
135
130
|
|
|
136
131
|
from cassandra.auth import PlainTextAuthProvider
|
|
137
132
|
from cassandra.cluster import Cluster, EXEC_PROFILE_DEFAULT, ExecutionProfile
|
|
133
|
+
from cassandra.connection import UnixSocketEndPoint
|
|
138
134
|
from cassandra.cqltypes import cql_typename
|
|
139
135
|
from cassandra.marshal import int64_unpack
|
|
140
136
|
from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata, TableMetadata, protect_name, protect_names, protect_value)
|
|
@@ -160,6 +156,10 @@ from cqlshlib.tracing import print_trace, print_trace_session
|
|
|
160
156
|
from cqlshlib.util import get_file_encoding_bomsize
|
|
161
157
|
from cqlshlib.util import is_file_secure, trim_if_present
|
|
162
158
|
|
|
159
|
+
try:
|
|
160
|
+
from cqlshlib._version import __version__ as version
|
|
161
|
+
except ImportError:
|
|
162
|
+
version = "0.0.0"
|
|
163
163
|
|
|
164
164
|
DEFAULT_HOST = '127.0.0.1'
|
|
165
165
|
DEFAULT_PORT = 9042
|
|
@@ -485,10 +485,16 @@ class Shell(cmd.Cmd):
|
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
if cloudconf is None:
|
|
488
|
-
|
|
488
|
+
if os.path.exists(self.hostname) and stat.S_ISSOCK(os.stat(self.hostname).st_mode):
|
|
489
|
+
kwargs['contact_points'] = (UnixSocketEndPoint(self.hostname),)
|
|
490
|
+
profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([UnixSocketEndPoint(self.hostname)])
|
|
491
|
+
else:
|
|
492
|
+
kwargs['contact_points'] = (self.hostname,)
|
|
493
|
+
profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([self.hostname])
|
|
489
494
|
kwargs['port'] = self.port
|
|
490
495
|
kwargs['ssl_context'] = sslhandling.ssl_settings(hostname, CONFIG_FILE) if ssl else None
|
|
491
|
-
|
|
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
|
|
492
498
|
else:
|
|
493
499
|
assert 'scylla' in DRIVER_NAME.lower(), f"{DRIVER_NAME} {DRIVER_VERSION} isn't supported by scylla_cloud"
|
|
494
500
|
kwargs['scylla_cloud'] = cloudconf
|
|
@@ -2126,7 +2132,11 @@ class Shell(cmd.Cmd):
|
|
|
2126
2132
|
kwargs['contact_points'] = (self.hostname,)
|
|
2127
2133
|
kwargs['port'] = self.port
|
|
2128
2134
|
kwargs['ssl_context'] = self.conn.ssl_context
|
|
2129
|
-
kwargs['
|
|
2135
|
+
kwargs['ssl_options'] = self.conn.ssl_options
|
|
2136
|
+
if os.path.exists(self.hostname) and stat.S_ISSOCK(os.stat(self.hostname).st_mode):
|
|
2137
|
+
kwargs['load_balancing_policy'] = WhiteListRoundRobinPolicy([UnixSocketEndPoint(self.hostname)])
|
|
2138
|
+
else:
|
|
2139
|
+
kwargs['load_balancing_policy'] = WhiteListRoundRobinPolicy([self.hostname])
|
|
2130
2140
|
else:
|
|
2131
2141
|
kwargs['scylla_cloud'] = self.cloudconf
|
|
2132
2142
|
|
|
@@ -2413,7 +2423,8 @@ def read_options(cmdlineargs, environment):
|
|
|
2413
2423
|
print("\nWarning: Password is found in an insecure cqlshrc file. The file is owned or readable by other users on the system.",
|
|
2414
2424
|
end='', file=sys.stderr)
|
|
2415
2425
|
print("\nNotice: Credentials in the cqlshrc file is deprecated and will be ignored in the future."
|
|
2416
|
-
"\nPlease use a credentials file to specify the username and password.\n"
|
|
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)
|
|
2417
2428
|
|
|
2418
2429
|
optvalues = optparse.Values()
|
|
2419
2430
|
|
|
@@ -2485,7 +2496,7 @@ def read_options(cmdlineargs, environment):
|
|
|
2485
2496
|
credentials.read(options.credentials)
|
|
2486
2497
|
|
|
2487
2498
|
# use the username from credentials file but fallback to cqlshrc if username is absent from the command line parameters
|
|
2488
|
-
options.username = username_from_cqlshrc
|
|
2499
|
+
options.username = option_with_default(credentials.get, 'plain_text_auth', 'username', username_from_cqlshrc)
|
|
2489
2500
|
|
|
2490
2501
|
if not options.password:
|
|
2491
2502
|
rawcredentials = configparser.RawConfigParser()
|
|
@@ -2493,7 +2504,6 @@ def read_options(cmdlineargs, environment):
|
|
|
2493
2504
|
|
|
2494
2505
|
# handling password in the same way as username, priority cli > credentials > cqlshrc
|
|
2495
2506
|
options.password = option_with_default(rawcredentials.get, 'plain_text_auth', 'password', password_from_cqlshrc)
|
|
2496
|
-
options.password = password_from_cqlshrc
|
|
2497
2507
|
elif not options.insecure_password_without_warning:
|
|
2498
2508
|
print("\nWarning: Using a password on the command line interface can be insecure."
|
|
2499
2509
|
"\nRecommendation: use the credentials file to securely provide the password.\n", file=sys.stderr)
|
cqlshlib/_version.py
CHANGED
cqlshlib/copyutil.py
CHANGED
|
@@ -86,6 +86,10 @@ def printmsg(msg, eol='\n'):
|
|
|
86
86
|
sys.stdout.flush()
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
def noop(*arg, **kwargs):
|
|
90
|
+
pass
|
|
91
|
+
|
|
92
|
+
|
|
89
93
|
class OneWayPipe(object):
|
|
90
94
|
"""
|
|
91
95
|
A one way pipe protected by two process level locks, one for reading and one for writing.
|
|
@@ -259,7 +263,7 @@ class CopyTask(object):
|
|
|
259
263
|
DEBUG = True
|
|
260
264
|
|
|
261
265
|
# do not display messages when exporting to STDOUT unless --debug is set
|
|
262
|
-
self.printmsg = printmsg if self.fname is not None or direction == 'from' or DEBUG else
|
|
266
|
+
self.printmsg = printmsg if self.fname is not None or direction == 'from' or DEBUG else noop
|
|
263
267
|
self.options = self.parse_options(opts, direction)
|
|
264
268
|
|
|
265
269
|
self.num_processes = self.options.copy['numprocesses']
|
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 =
|
|
89
|
-
|
|
90
|
-
|
|
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,26 +1,26 @@
|
|
|
1
|
-
copyutil.cpython-311-darwin.so,sha256=
|
|
2
|
-
scylla_cqlsh-6.0.
|
|
3
|
-
scylla_cqlsh-6.0.
|
|
4
|
-
scylla_cqlsh-6.0.
|
|
5
|
-
scylla_cqlsh-6.0.
|
|
6
|
-
scylla_cqlsh-6.0.
|
|
7
|
-
scylla_cqlsh-6.0.
|
|
1
|
+
copyutil.cpython-311-darwin.so,sha256=u8qPv9HWBNHA_qIi8G5m9-UFQZzbe01uD5cnp_MZKfM,1625808
|
|
2
|
+
scylla_cqlsh-6.0.18.dist-info/RECORD,,
|
|
3
|
+
scylla_cqlsh-6.0.18.dist-info/WHEEL,sha256=3Ij8bI-sb8yCMxXItr4MLlNoRGZb2WoUxQe9xIFR_DQ,111
|
|
4
|
+
scylla_cqlsh-6.0.18.dist-info/entry_points.txt,sha256=oE4unqgR3WwNkCJDGlMG1HYtCE3nEZZ4d9CIl-JSZyQ,46
|
|
5
|
+
scylla_cqlsh-6.0.18.dist-info/top_level.txt,sha256=PVG-5w7PDG3FoAJH6Rq2I8C0y4cKa2KOW75GxjHkmQ4,24
|
|
6
|
+
scylla_cqlsh-6.0.18.dist-info/LICENSE.txt,sha256=JAuKOf39K9OzU5wC40RmM0iE_ISwVrV_BunaNTI-zZc,11360
|
|
7
|
+
scylla_cqlsh-6.0.18.dist-info/METADATA,sha256=tsulS2kF9H2Mfj-y-EDHDSeUSuzIqJEiD9AzKdJ2HSg,2814
|
|
8
8
|
cqlshlib/authproviderhandling.py,sha256=p4r_sk64AC5eiv__n-gjwQk2Ni_CcK6lyAWSKEcgINs,7078
|
|
9
9
|
cqlshlib/cqlshhandling.py,sha256=BUu9wi7H1Xgil9lci-48TCPQ1xwe2-OTNXsW7jiewlM,10510
|
|
10
10
|
cqlshlib/tracing.py,sha256=ct7siXwNMINjGVXn9qr5h7XhDDM6Bi1uLljPUtcve-A,3403
|
|
11
|
-
cqlshlib/sslhandling.py,sha256=
|
|
11
|
+
cqlshlib/sslhandling.py,sha256=TtEib4N-BuL2KZJiGYijc9DQviYp2lzYlwLj4RLp0oQ,4649
|
|
12
12
|
cqlshlib/saferscanner.py,sha256=T4eSYVWuZf4piTS9PgHjFhuY6g1fOb4VVa1Bu4Y1v_I,3539
|
|
13
|
-
cqlshlib/_version.py,sha256=
|
|
13
|
+
cqlshlib/_version.py,sha256=zpagh7YkhhTkju5Ln-qIG2mcW5Mq7n5lvUdGSbz4tA0,413
|
|
14
14
|
cqlshlib/wcwidth.py,sha256=PsbF7OaDlLItaiV6niu8F_OOgVYLJo0Ypb5-cOJV3QY,15865
|
|
15
15
|
cqlshlib/displaying.py,sha256=bsA7T4BwQHgtH4jzCJeU3JrpgMT5k0xZ7EA2AnhYG7g,3977
|
|
16
16
|
cqlshlib/util.py,sha256=qWQmq9v28vZwZ4apzK0-UQOYPIW3TMk-Jq9I69LbW0k,5057
|
|
17
17
|
cqlshlib/cqlhandling.py,sha256=J-zzfU8sj0GbX-5vh5uV1gmFAYD_WOBsnVgd9PMaHoc,13103
|
|
18
18
|
cqlshlib/__init__.py,sha256=IhAMRujMv3XMvwQcYhUyXvJtWYuHpI-WfnIookmRago,3184
|
|
19
19
|
cqlshlib/formatting.py,sha256=NBHxsrXS3X8qcGewn98iTP7ys3JQUvWGf9iIWk-ErL0,23032
|
|
20
|
-
cqlshlib/copyutil.py,sha256=
|
|
20
|
+
cqlshlib/copyutil.py,sha256=mORX85C5CFqNSIoElATn4vKjUaCdUL8td5blyXlFDHI,113415
|
|
21
21
|
cqlshlib/helptopics.py,sha256=bBPtNHn2ySgO9K4nFBpJw2gcibryIdRh7dm3b9TUubQ,4524
|
|
22
22
|
cqlshlib/pylexotron.py,sha256=QY3nZ-fP-yGFIixMV33IgMlKV8A51AxnNYya0PGZc6I,19273
|
|
23
23
|
cqlshlib/cql3handling.py,sha256=S2rA8pbeSKjvmtWnBIthkDpC41pJU7L0OQO2Ob-YYg4,57506
|
|
24
|
-
cqlsh/cqlsh.py,sha256=
|
|
24
|
+
cqlsh/cqlsh.py,sha256=imaNFo1Kkzys68cohYqlNLL7FKe_JhAUnepfxPMyaFQ,111951
|
|
25
25
|
cqlsh/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
26
26
|
cqlsh/__main__.py,sha256=-IR7kYVwXf9uq9OBeVlAB5I386E1N9iEhrjn3sCw-74,220
|
|
File without changes
|
|
File without changes
|
|
File without changes
|