scylla-cqlsh 6.0.18__cp39-cp39-musllinux_1_1_x86_64.whl → 6.0.20__cp39-cp39-musllinux_1_1_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.

cqlsh/cqlsh.py CHANGED
@@ -478,7 +478,7 @@ class Shell(cmd.Cmd):
478
478
  if protocol_version is not None:
479
479
  kwargs['protocol_version'] = protocol_version
480
480
 
481
- profiles = {
481
+ self.profiles = {
482
482
  EXEC_PROFILE_DEFAULT: ExecutionProfile(consistency_level=cassandra.ConsistencyLevel.ONE,
483
483
  request_timeout=request_timeout,
484
484
  row_factory=ordered_dict_factory)
@@ -487,10 +487,10 @@ class Shell(cmd.Cmd):
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
489
  kwargs['contact_points'] = (UnixSocketEndPoint(self.hostname),)
490
- profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([UnixSocketEndPoint(self.hostname)])
490
+ self.profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([UnixSocketEndPoint(self.hostname)])
491
491
  else:
492
492
  kwargs['contact_points'] = (self.hostname,)
493
- profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([self.hostname])
493
+ self.profiles[EXEC_PROFILE_DEFAULT].load_balancing_policy = WhiteListRoundRobinPolicy([self.hostname])
494
494
  kwargs['port'] = self.port
495
495
  kwargs['ssl_context'] = sslhandling.ssl_settings(hostname, CONFIG_FILE) if ssl else None
496
496
  # workaround until driver would know not to lose the DNS names for `server_hostname`
@@ -503,7 +503,7 @@ class Shell(cmd.Cmd):
503
503
  auth_provider=self.auth_provider,
504
504
  control_connection_timeout=connect_timeout,
505
505
  connect_timeout=connect_timeout,
506
- execution_profiles=profiles,
506
+ execution_profiles=self.profiles,
507
507
  **kwargs)
508
508
  self.owns_connection = not use_conn
509
509
 
@@ -1589,7 +1589,10 @@ class Shell(cmd.Cmd):
1589
1589
  where object can be either a keyspace or a table or an index or a materialized
1590
1590
  view (in this order).
1591
1591
  """
1592
- if self.connection_versions['build'][0] < '4':
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:
1593
1596
  what = parsed.matched[1][1].lower()
1594
1597
  if what == 'functions':
1595
1598
  self.describe_functions_client(self.current_keyspace)
@@ -1665,6 +1668,10 @@ class Shell(cmd.Cmd):
1665
1668
  elif what:
1666
1669
  self.describe_element(result)
1667
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)
1668
1675
  except CQL_ERRORS as err:
1669
1676
  err_msg = err.message if hasattr(err, 'message') else str(err)
1670
1677
  self.printerr(err_msg.partition("message=")[2].strip('"'))
@@ -2133,10 +2140,6 @@ class Shell(cmd.Cmd):
2133
2140
  kwargs['port'] = self.port
2134
2141
  kwargs['ssl_context'] = self.conn.ssl_context
2135
2142
  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])
2140
2143
  else:
2141
2144
  kwargs['scylla_cloud'] = self.cloudconf
2142
2145
 
@@ -2145,6 +2148,7 @@ class Shell(cmd.Cmd):
2145
2148
  auth_provider=auth_provider,
2146
2149
  control_connection_timeout=self.conn.connect_timeout,
2147
2150
  connect_timeout=self.conn.connect_timeout,
2151
+ execution_profiles=self.profiles,
2148
2152
  **kwargs)
2149
2153
 
2150
2154
  if self.current_keyspace:
@@ -2153,9 +2157,6 @@ class Shell(cmd.Cmd):
2153
2157
  session = conn.connect()
2154
2158
 
2155
2159
  # Copy session properties
2156
- session.default_timeout = self.session.default_timeout
2157
- session.row_factory = self.session.row_factory
2158
- session.default_consistency_level = self.session.default_consistency_level
2159
2160
  session.max_trace_wait = self.session.max_trace_wait
2160
2161
 
2161
2162
  # Update after we've connected in case we fail to authenticate
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.18'
16
- __version_tuple__ = version_tuple = (6, 0, 18)
15
+ __version__ = version = '6.0.20'
16
+ __version_tuple__ = version_tuple = (6, 0, 20)
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
  ;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scylla-cqlsh
3
- Version: 6.0.18
3
+ Version: 6.0.20
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,26 +1,26 @@
1
1
  copyutil.cpython-39-x86_64-linux-gnu.so,sha256=MlPQSxK9_CVbFz6SZz8rJVkcp-SASYx0bP6Ii6lFbV8,12151056
2
- cqlsh/__main__.py,sha256=-IR7kYVwXf9uq9OBeVlAB5I386E1N9iEhrjn3sCw-74,220
3
- cqlsh/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
- cqlsh/cqlsh.py,sha256=imaNFo1Kkzys68cohYqlNLL7FKe_JhAUnepfxPMyaFQ,111951
5
- scylla_cqlsh-6.0.18.dist-info/RECORD,,
6
- scylla_cqlsh-6.0.18.dist-info/top_level.txt,sha256=PVG-5w7PDG3FoAJH6Rq2I8C0y4cKa2KOW75GxjHkmQ4,24
7
- scylla_cqlsh-6.0.18.dist-info/WHEEL,sha256=-dXUxQJS0dF4AHZCo07Dt2TCYvwyNT7o6m2vzxmW15M,111
8
- scylla_cqlsh-6.0.18.dist-info/LICENSE.txt,sha256=JAuKOf39K9OzU5wC40RmM0iE_ISwVrV_BunaNTI-zZc,11360
9
- scylla_cqlsh-6.0.18.dist-info/entry_points.txt,sha256=oE4unqgR3WwNkCJDGlMG1HYtCE3nEZZ4d9CIl-JSZyQ,46
10
- scylla_cqlsh-6.0.18.dist-info/METADATA,sha256=tsulS2kF9H2Mfj-y-EDHDSeUSuzIqJEiD9AzKdJ2HSg,2814
11
- cqlshlib/pylexotron.py,sha256=QY3nZ-fP-yGFIixMV33IgMlKV8A51AxnNYya0PGZc6I,19273
12
- cqlshlib/saferscanner.py,sha256=T4eSYVWuZf4piTS9PgHjFhuY6g1fOb4VVa1Bu4Y1v_I,3539
13
- cqlshlib/cql3handling.py,sha256=S2rA8pbeSKjvmtWnBIthkDpC41pJU7L0OQO2Ob-YYg4,57506
14
- cqlshlib/helptopics.py,sha256=bBPtNHn2ySgO9K4nFBpJw2gcibryIdRh7dm3b9TUubQ,4524
2
+ scylla_cqlsh-6.0.20.dist-info/WHEEL,sha256=-dXUxQJS0dF4AHZCo07Dt2TCYvwyNT7o6m2vzxmW15M,111
3
+ scylla_cqlsh-6.0.20.dist-info/top_level.txt,sha256=PVG-5w7PDG3FoAJH6Rq2I8C0y4cKa2KOW75GxjHkmQ4,24
4
+ scylla_cqlsh-6.0.20.dist-info/entry_points.txt,sha256=oE4unqgR3WwNkCJDGlMG1HYtCE3nEZZ4d9CIl-JSZyQ,46
5
+ scylla_cqlsh-6.0.20.dist-info/RECORD,,
6
+ scylla_cqlsh-6.0.20.dist-info/LICENSE.txt,sha256=JAuKOf39K9OzU5wC40RmM0iE_ISwVrV_BunaNTI-zZc,11360
7
+ scylla_cqlsh-6.0.20.dist-info/METADATA,sha256=sR4osCf7wZ_bxBCH0_F5vQYH9kxeA4nvLWc1nTOZrsY,2814
15
8
  cqlshlib/__init__.py,sha256=IhAMRujMv3XMvwQcYhUyXvJtWYuHpI-WfnIookmRago,3184
16
- cqlshlib/authproviderhandling.py,sha256=p4r_sk64AC5eiv__n-gjwQk2Ni_CcK6lyAWSKEcgINs,7078
17
- cqlshlib/displaying.py,sha256=bsA7T4BwQHgtH4jzCJeU3JrpgMT5k0xZ7EA2AnhYG7g,3977
18
- cqlshlib/wcwidth.py,sha256=PsbF7OaDlLItaiV6niu8F_OOgVYLJo0Ypb5-cOJV3QY,15865
19
- cqlshlib/tracing.py,sha256=ct7siXwNMINjGVXn9qr5h7XhDDM6Bi1uLljPUtcve-A,3403
20
- cqlshlib/_version.py,sha256=zpagh7YkhhTkju5Ln-qIG2mcW5Mq7n5lvUdGSbz4tA0,413
21
- cqlshlib/cqlhandling.py,sha256=J-zzfU8sj0GbX-5vh5uV1gmFAYD_WOBsnVgd9PMaHoc,13103
22
- cqlshlib/formatting.py,sha256=NBHxsrXS3X8qcGewn98iTP7ys3JQUvWGf9iIWk-ErL0,23032
23
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
13
+ cqlshlib/pylexotron.py,sha256=QY3nZ-fP-yGFIixMV33IgMlKV8A51AxnNYya0PGZc6I,19273
24
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=sIz2ccISGplFjcdmsw7Zjc6ukIepeandJ5PSyJIouYk,413
18
+ cqlshlib/tracing.py,sha256=ct7siXwNMINjGVXn9qr5h7XhDDM6Bi1uLljPUtcve-A,3403
19
+ cqlshlib/wcwidth.py,sha256=PsbF7OaDlLItaiV6niu8F_OOgVYLJo0Ypb5-cOJV3QY,15865
25
20
  cqlshlib/sslhandling.py,sha256=TtEib4N-BuL2KZJiGYijc9DQviYp2lzYlwLj4RLp0oQ,4649
26
- cqlshlib/cqlshhandling.py,sha256=BUu9wi7H1Xgil9lci-48TCPQ1xwe2-OTNXsW7jiewlM,10510
21
+ cqlshlib/cql3handling.py,sha256=cAE_UW8sg4UJ8PjS5rbbZn-O3_L9m2297Or-8f2s72Y,59123
22
+ cqlshlib/formatting.py,sha256=NBHxsrXS3X8qcGewn98iTP7ys3JQUvWGf9iIWk-ErL0,23032
23
+ cqlshlib/displaying.py,sha256=bsA7T4BwQHgtH4jzCJeU3JrpgMT5k0xZ7EA2AnhYG7g,3977
24
+ cqlsh/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
25
+ cqlsh/cqlsh.py,sha256=NCGYLjMk-Qnt7HLr0OJnNfnoH-HGKbHx7nBUrBL8SEA,111876
26
+ cqlsh/__main__.py,sha256=-IR7kYVwXf9uq9OBeVlAB5I386E1N9iEhrjn3sCw-74,220