scylla-cqlsh 6.0.16__cp312-cp312-musllinux_1_1_i686.whl → 6.0.19__cp312-cp312-musllinux_1_1_i686.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-312-i386-linux-musl.so +0 -0
- cqlsh/cqlsh.py +18 -9
- cqlshlib/_version.py +2 -2
- cqlshlib/cql3handling.py +43 -2
- cqlshlib/sslhandling.py +16 -3
- {scylla_cqlsh-6.0.16.dist-info → scylla_cqlsh-6.0.19.dist-info}/METADATA +1 -1
- {scylla_cqlsh-6.0.16.dist-info → scylla_cqlsh-6.0.19.dist-info}/RECORD +20 -20
- {scylla_cqlsh-6.0.16.dist-info → scylla_cqlsh-6.0.19.dist-info}/WHEEL +1 -1
- {scylla_cqlsh-6.0.16.dist-info → scylla_cqlsh-6.0.19.dist-info}/LICENSE.txt +0 -0
- {scylla_cqlsh-6.0.16.dist-info → scylla_cqlsh-6.0.19.dist-info}/entry_points.txt +0 -0
- {scylla_cqlsh-6.0.16.dist-info → scylla_cqlsh-6.0.19.dist-info}/top_level.txt +0 -0
|
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
|
|
@@ -1588,7 +1589,10 @@ class Shell(cmd.Cmd):
|
|
|
1588
1589
|
where object can be either a keyspace or a table or an index or a materialized
|
|
1589
1590
|
view (in this order).
|
|
1590
1591
|
"""
|
|
1591
|
-
|
|
1592
|
+
self._do_describe(parsed, force_client_side_describe=False)
|
|
1593
|
+
|
|
1594
|
+
def _do_describe(self, parsed, force_client_side_describe):
|
|
1595
|
+
if force_client_side_describe:
|
|
1592
1596
|
what = parsed.matched[1][1].lower()
|
|
1593
1597
|
if what == 'functions':
|
|
1594
1598
|
self.describe_functions_client(self.current_keyspace)
|
|
@@ -1664,6 +1668,10 @@ class Shell(cmd.Cmd):
|
|
|
1664
1668
|
elif what:
|
|
1665
1669
|
self.describe_element(result)
|
|
1666
1670
|
|
|
1671
|
+
except cassandra.protocol.SyntaxException:
|
|
1672
|
+
# Server doesn't support DESCRIBE query, retry with
|
|
1673
|
+
# client-side DESCRIBE implementation
|
|
1674
|
+
self._do_describe(parsed, force_client_side_describe=True)
|
|
1667
1675
|
except CQL_ERRORS as err:
|
|
1668
1676
|
err_msg = err.message if hasattr(err, 'message') else str(err)
|
|
1669
1677
|
self.printerr(err_msg.partition("message=")[2].strip('"'))
|
|
@@ -2131,6 +2139,7 @@ class Shell(cmd.Cmd):
|
|
|
2131
2139
|
kwargs['contact_points'] = (self.hostname,)
|
|
2132
2140
|
kwargs['port'] = self.port
|
|
2133
2141
|
kwargs['ssl_context'] = self.conn.ssl_context
|
|
2142
|
+
kwargs['ssl_options'] = self.conn.ssl_options
|
|
2134
2143
|
if os.path.exists(self.hostname) and stat.S_ISSOCK(os.stat(self.hostname).st_mode):
|
|
2135
2144
|
kwargs['load_balancing_policy'] = WhiteListRoundRobinPolicy([UnixSocketEndPoint(self.hostname)])
|
|
2136
2145
|
else:
|
|
@@ -2421,7 +2430,8 @@ def read_options(cmdlineargs, environment):
|
|
|
2421
2430
|
print("\nWarning: Password is found in an insecure cqlshrc file. The file is owned or readable by other users on the system.",
|
|
2422
2431
|
end='', file=sys.stderr)
|
|
2423
2432
|
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"
|
|
2433
|
+
"\nPlease use a credentials file to specify the username and password.\n"
|
|
2434
|
+
"\nTo use basic authentication, place the username and password in the [PlainTextAuthProvider] section of the credentials file.\n", file=sys.stderr)
|
|
2425
2435
|
|
|
2426
2436
|
optvalues = optparse.Values()
|
|
2427
2437
|
|
|
@@ -2493,7 +2503,7 @@ def read_options(cmdlineargs, environment):
|
|
|
2493
2503
|
credentials.read(options.credentials)
|
|
2494
2504
|
|
|
2495
2505
|
# 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
|
|
2506
|
+
options.username = option_with_default(credentials.get, 'plain_text_auth', 'username', username_from_cqlshrc)
|
|
2497
2507
|
|
|
2498
2508
|
if not options.password:
|
|
2499
2509
|
rawcredentials = configparser.RawConfigParser()
|
|
@@ -2501,7 +2511,6 @@ def read_options(cmdlineargs, environment):
|
|
|
2501
2511
|
|
|
2502
2512
|
# handling password in the same way as username, priority cli > credentials > cqlshrc
|
|
2503
2513
|
options.password = option_with_default(rawcredentials.get, 'plain_text_auth', 'password', password_from_cqlshrc)
|
|
2504
|
-
options.password = password_from_cqlshrc
|
|
2505
2514
|
elif not options.insecure_password_without_warning:
|
|
2506
2515
|
print("\nWarning: Using a password on the command line interface can be insecure."
|
|
2507
2516
|
"\nRecommendation: use the credentials file to securely provide the password.\n", file=sys.stderr)
|
cqlshlib/_version.py
CHANGED
cqlshlib/cql3handling.py
CHANGED
|
@@ -36,8 +36,8 @@ class UnexpectedTableStructure(UserWarning):
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
SYSTEM_KEYSPACES = ('system', 'system_schema', 'system_traces', 'system_auth', 'system_distributed', 'system_views',
|
|
39
|
-
'system_virtual_schema', 'system_distributed_everywhere')
|
|
40
|
-
NONALTERBALE_KEYSPACES = ('system', 'system_schema', 'system_views', 'system_virtual_schema', 'system_distributed_everywhere')
|
|
39
|
+
'system_virtual_schema', 'system_distributed_everywhere', 'system_replicated_keys')
|
|
40
|
+
NONALTERBALE_KEYSPACES = ('system', 'system_schema', 'system_views', 'system_virtual_schema', 'system_distributed_everywhere', 'system_replicated_keys')
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
class Cql3ParsingRuleSet(CqlParsingRuleSet):
|
|
@@ -296,6 +296,12 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
|
|
|
296
296
|
| <alterRoleStatement>
|
|
297
297
|
| <dropRoleStatement>
|
|
298
298
|
| <listRolesStatement>
|
|
299
|
+
| <createSlaStatement>
|
|
300
|
+
| <alterSlaStatement>
|
|
301
|
+
| <dropSlaStatement>
|
|
302
|
+
| <listSlaStatement>
|
|
303
|
+
| <attachSlaStatement>
|
|
304
|
+
| <detachRSlaStatement>
|
|
299
305
|
;
|
|
300
306
|
|
|
301
307
|
<authorizationStatement> ::= <grantStatement>
|
|
@@ -1501,6 +1507,41 @@ syntax_rules += r'''
|
|
|
1501
1507
|
;
|
|
1502
1508
|
'''
|
|
1503
1509
|
|
|
1510
|
+
syntax_rules += r'''
|
|
1511
|
+
<slaName> ::= <identifier>
|
|
1512
|
+
| <quotedName>
|
|
1513
|
+
| <unreservedKeyword>
|
|
1514
|
+
;
|
|
1515
|
+
|
|
1516
|
+
<createSlaStatement> ::= "CREATE" "SERVICE_LEVEL" ( "IF" "NOT" "EXISTS" )? <slaName>
|
|
1517
|
+
( "WITH" <slaProperty> ("AND" <slaProperty>)*)?
|
|
1518
|
+
;
|
|
1519
|
+
|
|
1520
|
+
<alterSlaStatement> ::= "ALTER" "SERVICE_LEVEL" ("IF" "EXISTS")? <slaName>
|
|
1521
|
+
( "WITH" <slaProperty> ("AND" <slaProperty>)*)?
|
|
1522
|
+
;
|
|
1523
|
+
|
|
1524
|
+
<slaProperty> ::= "WORKLOAD_TYPE" "=" <stringLiteral>
|
|
1525
|
+
| "TIMEOUT" "=" <wholenumber>
|
|
1526
|
+
| "SHARES" "=" <wholenumber>
|
|
1527
|
+
;
|
|
1528
|
+
|
|
1529
|
+
<dropSlaStatement> ::= "DROP" "SERVICE_LEVEL" ("IF" "EXISTS")? <slaName>
|
|
1530
|
+
;
|
|
1531
|
+
|
|
1532
|
+
<listSlaStatement> ::= ("LIST" "SERVICE_LEVEL" <slaName> )
|
|
1533
|
+
| ("LIST" "ATTACHED" "SERVICE_LEVEL" "OF" <rolename> )
|
|
1534
|
+
| ("LIST" "ALL" "SERVICE_LEVELS" )
|
|
1535
|
+
| ("LIST" "ALL" "ATTACHED" "SERVICE_LEVELS" )
|
|
1536
|
+
;
|
|
1537
|
+
|
|
1538
|
+
<attachSlaStatement> ::= "ATTACH" "SERVICE_LEVEL" <slaName> "TO" <rolename>
|
|
1539
|
+
;
|
|
1540
|
+
|
|
1541
|
+
<detachRSlaStatement> ::= "DETACH" "SERVICE_LEVEL" <slaName> "FROM" <rolename>
|
|
1542
|
+
;
|
|
1543
|
+
'''
|
|
1544
|
+
|
|
1504
1545
|
syntax_rules += r'''
|
|
1505
1546
|
<grantStatement> ::= "GRANT" <permissionExpr> "ON" <resource> "TO" <rolename>
|
|
1506
1547
|
;
|
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-312-i386-linux-musl.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.
|
|
8
|
-
cqlshlib/wcwidth.py,sha256=PsbF7OaDlLItaiV6niu8F_OOgVYLJo0Ypb5-cOJV3QY,15865
|
|
9
|
-
cqlshlib/cql3handling.py,sha256=S2rA8pbeSKjvmtWnBIthkDpC41pJU7L0OQO2Ob-YYg4,57506
|
|
10
|
-
cqlshlib/cqlshhandling.py,sha256=BUu9wi7H1Xgil9lci-48TCPQ1xwe2-OTNXsW7jiewlM,10510
|
|
11
|
-
cqlshlib/authproviderhandling.py,sha256=p4r_sk64AC5eiv__n-gjwQk2Ni_CcK6lyAWSKEcgINs,7078
|
|
12
|
-
cqlshlib/util.py,sha256=qWQmq9v28vZwZ4apzK0-UQOYPIW3TMk-Jq9I69LbW0k,5057
|
|
13
|
-
cqlshlib/cqlhandling.py,sha256=J-zzfU8sj0GbX-5vh5uV1gmFAYD_WOBsnVgd9PMaHoc,13103
|
|
14
|
-
cqlshlib/displaying.py,sha256=bsA7T4BwQHgtH4jzCJeU3JrpgMT5k0xZ7EA2AnhYG7g,3977
|
|
1
|
+
copyutil.cpython-312-i386-linux-musl.so,sha256=wcCiYV22V3MaNKXXTQ9TNEKNkkGzU4ARr2F-Ee8Zjt8,9405612
|
|
2
|
+
scylla_cqlsh-6.0.19.dist-info/WHEEL,sha256=IKrDIzQ3rB6UMluXz0mlxa4dJRc8csRO7VVYq_Shvsc,111
|
|
3
|
+
scylla_cqlsh-6.0.19.dist-info/top_level.txt,sha256=PVG-5w7PDG3FoAJH6Rq2I8C0y4cKa2KOW75GxjHkmQ4,24
|
|
4
|
+
scylla_cqlsh-6.0.19.dist-info/entry_points.txt,sha256=oE4unqgR3WwNkCJDGlMG1HYtCE3nEZZ4d9CIl-JSZyQ,46
|
|
5
|
+
scylla_cqlsh-6.0.19.dist-info/RECORD,,
|
|
6
|
+
scylla_cqlsh-6.0.19.dist-info/LICENSE.txt,sha256=JAuKOf39K9OzU5wC40RmM0iE_ISwVrV_BunaNTI-zZc,11360
|
|
7
|
+
scylla_cqlsh-6.0.19.dist-info/METADATA,sha256=OqDy7Znht-rfh7fgVvq4rC8-CtxcaZcAiwd9pN3VptA,2814
|
|
15
8
|
cqlshlib/__init__.py,sha256=IhAMRujMv3XMvwQcYhUyXvJtWYuHpI-WfnIookmRago,3184
|
|
16
|
-
cqlshlib/
|
|
17
|
-
cqlshlib/
|
|
18
|
-
cqlshlib/
|
|
9
|
+
cqlshlib/util.py,sha256=qWQmq9v28vZwZ4apzK0-UQOYPIW3TMk-Jq9I69LbW0k,5057
|
|
10
|
+
cqlshlib/authproviderhandling.py,sha256=p4r_sk64AC5eiv__n-gjwQk2Ni_CcK6lyAWSKEcgINs,7078
|
|
11
|
+
cqlshlib/saferscanner.py,sha256=T4eSYVWuZf4piTS9PgHjFhuY6g1fOb4VVa1Bu4Y1v_I,3539
|
|
12
|
+
cqlshlib/cqlshhandling.py,sha256=BUu9wi7H1Xgil9lci-48TCPQ1xwe2-OTNXsW7jiewlM,10510
|
|
19
13
|
cqlshlib/pylexotron.py,sha256=QY3nZ-fP-yGFIixMV33IgMlKV8A51AxnNYya0PGZc6I,19273
|
|
20
14
|
cqlshlib/copyutil.py,sha256=mORX85C5CFqNSIoElATn4vKjUaCdUL8td5blyXlFDHI,113415
|
|
15
|
+
cqlshlib/cqlhandling.py,sha256=J-zzfU8sj0GbX-5vh5uV1gmFAYD_WOBsnVgd9PMaHoc,13103
|
|
16
|
+
cqlshlib/helptopics.py,sha256=bBPtNHn2ySgO9K4nFBpJw2gcibryIdRh7dm3b9TUubQ,4524
|
|
17
|
+
cqlshlib/_version.py,sha256=83SpZBNnw0woA9Vz9Vm9uAiLPcVFE3xip1EgBKVBZLU,413
|
|
18
|
+
cqlshlib/tracing.py,sha256=ct7siXwNMINjGVXn9qr5h7XhDDM6Bi1uLljPUtcve-A,3403
|
|
19
|
+
cqlshlib/wcwidth.py,sha256=PsbF7OaDlLItaiV6niu8F_OOgVYLJo0Ypb5-cOJV3QY,15865
|
|
20
|
+
cqlshlib/sslhandling.py,sha256=TtEib4N-BuL2KZJiGYijc9DQviYp2lzYlwLj4RLp0oQ,4649
|
|
21
|
+
cqlshlib/cql3handling.py,sha256=cAE_UW8sg4UJ8PjS5rbbZn-O3_L9m2297Or-8f2s72Y,59123
|
|
21
22
|
cqlshlib/formatting.py,sha256=NBHxsrXS3X8qcGewn98iTP7ys3JQUvWGf9iIWk-ErL0,23032
|
|
22
|
-
cqlshlib/
|
|
23
|
-
cqlshlib/_version.py,sha256=zmelrXjeMNRI3Z8ia7nEklwHQWMaCnJZRYmE6wGfIS4,413
|
|
23
|
+
cqlshlib/displaying.py,sha256=bsA7T4BwQHgtH4jzCJeU3JrpgMT5k0xZ7EA2AnhYG7g,3977
|
|
24
24
|
cqlsh/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
25
|
-
cqlsh/cqlsh.py,sha256=
|
|
25
|
+
cqlsh/cqlsh.py,sha256=IRX_82TLoHqFKjfJ4EaiXRDlth-Ijbv43pv6DjGz99A,112321
|
|
26
26
|
cqlsh/__main__.py,sha256=-IR7kYVwXf9uq9OBeVlAB5I386E1N9iEhrjn3sCw-74,220
|
|
File without changes
|
|
File without changes
|
|
File without changes
|