scylla-cqlsh 6.0.18__tar.gz → 6.0.20__tar.gz

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.

Files changed (106) hide show
  1. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/.github/workflows/build-push.yml +22 -0
  2. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/PKG-INFO +1 -1
  3. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/bin/cqlsh.py +13 -12
  4. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlsh/cqlsh.py +13 -12
  5. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/_version.py +2 -2
  6. {scylla_cqlsh-6.0.18/pylib → scylla_cqlsh-6.0.20}/cqlshlib/cql3handling.py +43 -2
  7. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20/pylib}/cqlshlib/cql3handling.py +43 -2
  8. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_cqlsh_completion.py +63 -9
  9. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_cqlsh_output.py +60 -9
  10. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pyproject.toml +1 -1
  11. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/reloc/build_reloc.sh +1 -1
  12. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/requirements.txt +1 -1
  13. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scylla_cqlsh.egg-info/PKG-INFO +1 -1
  14. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/.dockerignore +0 -0
  15. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/.github/workflows/dockerhub-description.yml +0 -0
  16. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/.gitignore +0 -0
  17. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/Dockerfile +0 -0
  18. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/LICENSE.txt +0 -0
  19. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/README.md +0 -0
  20. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/SCYLLA-VERSION-GEN +0 -0
  21. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/bin/cqlsh +0 -0
  22. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlsh/__init__.py +0 -0
  23. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlsh/__main__.py +0 -0
  24. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/__init__.py +0 -0
  25. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/authproviderhandling.py +0 -0
  26. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/copyutil.c +0 -0
  27. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/copyutil.py +0 -0
  28. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/cqlhandling.py +0 -0
  29. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/cqlshhandling.py +0 -0
  30. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/displaying.py +0 -0
  31. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/formatting.py +0 -0
  32. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/helptopics.py +0 -0
  33. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/pylexotron.py +0 -0
  34. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/saferscanner.py +0 -0
  35. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/sslhandling.py +0 -0
  36. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/tracing.py +0 -0
  37. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/util.py +0 -0
  38. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/cqlshlib/wcwidth.py +0 -0
  39. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/changelog.template +0 -0
  40. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/control.template +0 -0
  41. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/debian/compat +0 -0
  42. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/debian/copyright +0 -0
  43. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/debian/rules +0 -0
  44. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/debian/source/format +0 -0
  45. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/debian/source/options +0 -0
  46. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/debian/debian_files_gen.py +0 -0
  47. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/dist/redhat/scylla-cqlsh.spec +0 -0
  48. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/install-dependencies.sh +0 -0
  49. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/install.sh +0 -0
  50. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/Dockerfile.ubuntu.py3 +0 -0
  51. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/Dockerfile.ubuntu.py37 +0 -0
  52. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/Dockerfile.ubuntu.py38 +0 -0
  53. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/README.asc +0 -0
  54. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cassandra-cqlsh-tests.sh +0 -0
  55. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/__init__.py +0 -0
  56. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/authproviderhandling.py +0 -0
  57. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/copyutil.py +0 -0
  58. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/cqlhandling.py +0 -0
  59. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/cqlshhandling.py +0 -0
  60. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/displaying.py +0 -0
  61. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/formatting.py +0 -0
  62. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/helptopics.py +0 -0
  63. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/pylexotron.py +0 -0
  64. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/saferscanner.py +0 -0
  65. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/sslhandling.py +0 -0
  66. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/__init__.py +0 -0
  67. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/ansi_colors.py +0 -0
  68. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/basecase.py +0 -0
  69. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/cassconnect.py +0 -0
  70. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/reserved_keywords.txt +0 -0
  71. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/run_cqlsh.py +0 -0
  72. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling.py +0 -0
  73. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/complex_auth_provider +0 -0
  74. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/complex_auth_provider_creds +0 -0
  75. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/complex_auth_provider_with_pass +0 -0
  76. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/empty_example +0 -0
  77. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/full_plain_text_example +0 -0
  78. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/illegal_example +0 -0
  79. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/no_classname_example +0 -0
  80. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/partial_example +0 -0
  81. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/plain_text_full_creds +0 -0
  82. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/plain_text_legacy +0 -0
  83. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/plain_text_partial_creds +0 -0
  84. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_authproviderhandling_config/plain_text_partial_example +0 -0
  85. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_constants.py +0 -0
  86. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_copyutil.py +0 -0
  87. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_cql_parsing.py +0 -0
  88. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_keyspace_init.cql +0 -0
  89. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_legacy_auth.py +0 -0
  90. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/test_unicode.py +0 -0
  91. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/test/winpty.py +0 -0
  92. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/tracing.py +0 -0
  93. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/util.py +0 -0
  94. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/cqlshlib/wcwidth.py +0 -0
  95. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/requirements.txt +0 -0
  96. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/pylib/setup.py +0 -0
  97. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/reloc/build_deb.sh +0 -0
  98. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/reloc/build_rpm.sh +0 -0
  99. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scripts/create-relocatable-package.py +0 -0
  100. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scylla_cqlsh.egg-info/SOURCES.txt +0 -0
  101. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scylla_cqlsh.egg-info/dependency_links.txt +0 -0
  102. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scylla_cqlsh.egg-info/entry_points.txt +0 -0
  103. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scylla_cqlsh.egg-info/requires.txt +0 -0
  104. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/scylla_cqlsh.egg-info/top_level.txt +0 -0
  105. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/setup.cfg +0 -0
  106. {scylla_cqlsh-6.0.18 → scylla_cqlsh-6.0.20}/setup.py +0 -0
@@ -69,6 +69,28 @@ jobs:
69
69
  pip install -r ./pylib/requirements.txt
70
70
  pytest ./cqlshlib/test
71
71
 
72
+ integration_test_scylla_enterprise:
73
+ name: Integration Tests (Scylla Enterprise)
74
+ if: "!contains(github.event.pull_request.labels.*.name, 'disable-integration-test')"
75
+ runs-on: ubuntu-latest
76
+ steps:
77
+ - uses: actions/checkout@v3
78
+
79
+ - name: Start Scylla
80
+ run: |
81
+ export DOCKER_ID=$(docker run -d scylladb/scylla-enterprise:latest --cluster-name test )
82
+ export CQL_TEST_HOST=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ${DOCKER_ID})
83
+ while ! nc -z ${CQL_TEST_HOST} 9042; do
84
+ sleep 0.1 # wait for 1/10 of the second before check again
85
+ done
86
+
87
+ echo "CQL_TEST_HOST=${CQL_TEST_HOST}" >> $GITHUB_ENV
88
+
89
+ - name: pytest
90
+ run: |
91
+ pip install -r ./pylib/requirements.txt
92
+ pytest ./cqlshlib/test
93
+
72
94
  integration_test_scylla_cloud_bundle:
73
95
  name: Integration Tests (Scylla Cloud Bundle)
74
96
  if: "!contains(github.event.pull_request.labels.*.name, 'disable-integration-test')"
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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
  ;
@@ -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
  ;
@@ -21,8 +21,12 @@
21
21
  import locale
22
22
  import os
23
23
  import re
24
+
25
+ from cassandra import InvalidRequest
26
+ from packaging.version import Version
27
+
24
28
  from .basecase import BaseTestCase
25
- from .cassconnect import create_db, remove_db, testrun_cqlsh
29
+ from .cassconnect import create_db, remove_db, testrun_cqlsh, get_cassandra_connection
26
30
  from .run_cqlsh import TimeoutError
27
31
  from cqlshlib.cql3handling import CqlRuleSet
28
32
 
@@ -48,6 +52,14 @@ class CqlshCompletionCase(BaseTestCase):
48
52
  output = c.cmd_and_response("SELECT * FROM system_schema.scylla_tables LIMIT 1;")
49
53
  cls.is_scylla = '1 rows' in output
50
54
 
55
+ with get_cassandra_connection().connect() as session:
56
+ try:
57
+ result = session.execute("SELECT version FROM system.versions WHERE key = 'local' LIMIT 1")
58
+ cls.scylla_version = Version(result.one().version.rsplit('.', 2)[0])
59
+ cls.is_scylla_enterprise = cls.scylla_version > Version('2018.1')
60
+ except InvalidRequest:
61
+ cls.is_scylla_enterprise = False
62
+
51
63
  @classmethod
52
64
  def tearDownClass(cls):
53
65
  remove_db()
@@ -63,6 +75,18 @@ class CqlshCompletionCase(BaseTestCase):
63
75
  def tearDown(self):
64
76
  self.cqlsh_runner.__exit__(None, None, None)
65
77
 
78
+ def _system_keyspaces(self):
79
+ tables = []
80
+
81
+ if self.is_scylla:
82
+ tables += ['system_distributed_everywhere.']
83
+ if self.is_scylla_enterprise:
84
+ tables += ['system_replicated_keys.']
85
+ else:
86
+ tables += ['system_views.', 'system_virtual_schema.']
87
+
88
+ return tables
89
+
66
90
  def _get_completions(self, inputstring, split_completed_lines=True):
67
91
  """
68
92
  Get results of tab completion in cqlsh. Returns a bare string if a
@@ -167,7 +191,7 @@ class TestCqlshCompletion(CqlshCompletionCase):
167
191
  'COPY', 'CREATE', 'DEBUG', 'DELETE', 'DESC', 'DESCRIBE',
168
192
  'DROP', 'GRANT', 'HELP', 'INSERT', 'LIST', 'LOGIN', 'PAGING', 'REVOKE',
169
193
  'SELECT', 'SHOW', 'SOURCE', 'TRACING', 'EXPAND', 'SERIAL', 'TRUNCATE',
170
- 'UPDATE', 'USE', 'exit', 'quit', 'CLEAR', 'CLS'))
194
+ 'UPDATE', 'USE', 'exit', 'quit', 'CLEAR', 'CLS', 'ATTACH', 'DETACH'))
171
195
 
172
196
  def test_complete_command_words(self):
173
197
  self.trycompletions('alt', '\b\b\bALTER ')
@@ -254,7 +278,7 @@ class TestCqlshCompletion(CqlshCompletionCase):
254
278
  'EXPAND', 'GRANT', 'HELP', 'INSERT', 'LIST', 'LOGIN', 'PAGING',
255
279
  'REVOKE', 'SELECT', 'SHOW', 'SOURCE', 'SERIAL', 'TRACING',
256
280
  'TRUNCATE', 'UPDATE', 'USE', 'exit', 'quit',
257
- 'CLEAR', 'CLS'])
281
+ 'CLEAR', 'CLS', 'ATTACH', 'DETACH'])
258
282
 
259
283
  self.trycompletions(
260
284
  ("INSERT INTO twenty_rows_composite_table (a, b, c) "
@@ -555,7 +579,7 @@ class TestCqlshCompletion(CqlshCompletionCase):
555
579
  self.trycompletions('DROP ',
556
580
  choices=['AGGREGATE', 'COLUMNFAMILY', 'FUNCTION',
557
581
  'INDEX', 'KEYSPACE', 'ROLE', 'TABLE',
558
- 'TRIGGER', 'TYPE', 'USER', 'MATERIALIZED'])
582
+ 'TRIGGER', 'TYPE', 'USER', 'MATERIALIZED', 'SERVICE_LEVEL'])
559
583
 
560
584
  def test_complete_in_drop_keyspace(self):
561
585
  self.trycompletions('DROP K', immediate='EYSPACE ')
@@ -927,9 +951,8 @@ class TestCqlshCompletion(CqlshCompletionCase):
927
951
  'utf8_with_special_chars',
928
952
  'system_traces.', 'songs',
929
953
  'system_schema.', 'system_distributed.',
930
- self.cqlsh.keyspace + '.'] +
931
- (['system_distributed_everywhere.'] if self.is_scylla else
932
- ['system_views.', 'system_virtual_schema.']))
954
+ self.cqlsh.keyspace + '.'] + self._system_keyspaces()
955
+ )
933
956
  self.trycompletions('ALTER TABLE IF EXISTS new_table ADD ', choices=['<new_column_name>', 'IF'])
934
957
  self.trycompletions('ALTER TABLE IF EXISTS new_table ADD IF NOT EXISTS ', choices=['<new_column_name>'])
935
958
  self.trycompletions('ALTER TABLE new_table ADD IF NOT EXISTS ', choices=['<new_column_name>'])
@@ -943,8 +966,7 @@ class TestCqlshCompletion(CqlshCompletionCase):
943
966
  'tags', 'system_traces.', 'system_distributed.',
944
967
  'phone_number', 'band_info_type', 'address', 'system.', 'system_schema.',
945
968
  'system_auth.', self.cqlsh.keyspace + '.'
946
- ] + (['system_distributed_everywhere.'] if self.is_scylla else
947
- ['system_views.', 'system_virtual_schema.']))
969
+ ] + self._system_keyspaces())
948
970
  self.trycompletions('ALTER TYPE IF EXISTS new_type ADD ', choices=['<new_field_name>', 'IF'])
949
971
  self.trycompletions('ALTER TYPE IF EXISTS new_type ADD IF NOT EXISTS ', choices=['<new_field_name>'])
950
972
  self.trycompletions('ALTER TYPE IF EXISTS new_type RENAME ', choices=['IF', '<quotedName>', '<identifier>'])
@@ -954,3 +976,35 @@ class TestCqlshCompletion(CqlshCompletionCase):
954
976
 
955
977
  def test_complete_in_alter_role(self):
956
978
  self.trycompletions('ALTER ROLE ', choices=['<identifier>', 'IF', '<quotedName>'])
979
+
980
+ def test_complete_in_alter_service_level(self):
981
+ self.trycompletions('ALTER SERVICE_LEVEL ', choices=['<identifier>', 'IF', '<quotedName>'])
982
+
983
+ def test_complete_in_create_service_level(self):
984
+ self.trycompletions('CREATE SERVICE_LEVEL "sla" WITH ',
985
+ choices=['WORKLOAD_TYPE', 'TIMEOUT', 'SHARES'])
986
+
987
+ def test_complete_in_attach_service_level(self):
988
+ self.trycompletions('ATTACH ',
989
+ immediate="SERVICE_LEVEL ")
990
+ self.trycompletions('ATTACH SERVICE_LEVEL "sla" ',
991
+ immediate="TO ")
992
+ self.trycompletions('ATTACH SERVICE_LEVEL "sla" TO ',
993
+ choices=['<identifier>', '<quotedName>'])
994
+
995
+ def test_complete_in_list_service_levels(self):
996
+
997
+ self.trycompletions("LIST ALL ",
998
+ choices={'ON', 'NORECURSIVE', 'OF', 'ATTACHED', ';', 'SERVICE_LEVELS', 'PERMISSIONS'})
999
+
1000
+ self.trycompletions("LIST ALL SERVICE_LEVELS ",
1001
+ choices={';'})
1002
+
1003
+ self.trycompletions("LIST ALL ATTACHED ",
1004
+ immediate='SERVICE_LEVELS ;')
1005
+
1006
+ self.trycompletions("LIST ATTACHED ",
1007
+ immediate='SERVICE_LEVEL OF ')
1008
+
1009
+ self.trycompletions("LIST SERVICE_LEVEL ",
1010
+ choices={'<quotedName>', '<identifier>'})
@@ -36,6 +36,44 @@ from .ansi_colors import (ColoredText, ansi_seq, lookup_colorcode,
36
36
  CONTROL_C = '\x03'
37
37
  CONTROL_D = '\x04'
38
38
 
39
+ def _normalize_response(response):
40
+ def should_keep(line):
41
+ if not line.strip():
42
+ return False
43
+ deprecated_options = ["dclocal_read_repair_chance", "read_repair_chance"]
44
+ for col in deprecated_options:
45
+ if col in line:
46
+ return False
47
+ ignore_options = ["paxos_grace_seconds", "tombstone_gc", "cdc"]
48
+ for col in ignore_options:
49
+ if col in line:
50
+ return False
51
+ return True
52
+
53
+ def normalize(line):
54
+ # normalize 0.0, 1.0 etc to 0, 1 etc.
55
+ line = re.sub(r"\b(\d+)\.0\b", r"\1", line)
56
+ # replace multiple whitespaces with a single whitespace
57
+ line = re.sub(r"\s+", " ", line)
58
+
59
+ line = line.rstrip(";,:")
60
+
61
+ # enforce formatting without whitespace in {ks}.{table} ({col}) and then listing items
62
+ line = re.sub(r"(\w+\.\w+)\s\(", r"\1(", line)
63
+ line = re.sub(r",\s+'", ",'", line)
64
+ if " PRIMARY KEY" in line:
65
+ return {line.replace(" PRIMARY KEY", ""), f"PRIMARY KEY ({line.split()[0]})"}
66
+ if ":" in line:
67
+ return set(line.split(":"))
68
+ return {line}
69
+
70
+ resp = set()
71
+ for s in response.split("\n"):
72
+ if should_keep(s):
73
+ resp.update(normalize(s.strip()))
74
+
75
+ return resp
76
+
39
77
 
40
78
  class TestCqlshOutput(BaseTestCase):
41
79
  @classmethod
@@ -57,6 +95,16 @@ class TestCqlshOutput(BaseTestCase):
57
95
  cls.is_scylla = len(output.all()) == 1
58
96
  except InvalidRequest:
59
97
  cls.is_scylla = False
98
+ try:
99
+ result = curs.execute("SELECT version FROM system.versions WHERE key = 'local' LIMIT 1")
100
+ cls.scylla_version = Version(result.one().version.rsplit('.', 2)[0])
101
+ cls.is_scylla_enterprise = cls.scylla_version > Version('2018.1')
102
+ except InvalidRequest:
103
+ cls.is_scylla_enterprise = False
104
+
105
+ @property
106
+ def default_compaction_strategy(self):
107
+ return 'IncrementalCompactionStrategy' if self.is_scylla_enterprise else 'SizeTieredCompactionStrategy'
60
108
 
61
109
  def setUp(self):
62
110
  env = os.environ.copy()
@@ -684,7 +732,7 @@ class TestCqlshOutput(BaseTestCase):
684
732
  AND read_repair = 'BLOCKING'
685
733
  AND speculative_retry = '99p';""" % quote_name(get_keyspace()))
686
734
 
687
- scylla_table_desc = dedent("""
735
+ scylla_table_desc = dedent(f"""
688
736
  CREATE TABLE %s.has_all_types (
689
737
  num int PRIMARY KEY,
690
738
  asciicol ascii,
@@ -703,10 +751,10 @@ class TestCqlshOutput(BaseTestCase):
703
751
  varcharcol text,
704
752
  varintcol varint
705
753
  ) WITH bloom_filter_fp_chance = 0.01
706
- AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
754
+ AND caching = {{'keys': 'ALL', 'rows_per_partition': 'ALL'}}
707
755
  AND comment = ''
708
- AND compaction = {'class': 'SizeTieredCompactionStrategy'}
709
- AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
756
+ AND compaction = {{'class': '{self.default_compaction_strategy}'}}
757
+ AND compression = {{'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}}
710
758
  AND crc_check_chance = 1.0
711
759
  AND dclocal_read_repair_chance = 0.0
712
760
  AND default_time_to_live = 0
@@ -726,7 +774,7 @@ class TestCqlshOutput(BaseTestCase):
726
774
  for semicolon in (';', ''):
727
775
  output = c.cmd_and_response('%s has_all_types%s' % (cmdword, semicolon))
728
776
  self.assertNoHasColors(output)
729
- self.assertSequenceEqual(dedent(output).split('\n'), table_desc3.split('\n'))
777
+ self.assertSetEqual(_normalize_response(dedent(output)), _normalize_response(table_desc3))
730
778
 
731
779
  def test_describe_columnfamilies_output(self):
732
780
  output_re = r'''
@@ -792,8 +840,9 @@ class TestCqlshOutput(BaseTestCase):
792
840
  output_re_client = r'''(?x)
793
841
  ^
794
842
  \n
795
- Cluster: [ ] (?P<clustername> .* ) \n
796
- Partitioner: [ ] (?P<partitionername> .* ) \n
843
+ Cluster: [ ] (?P<clustername> .* )\s?\n
844
+ Partitioner: [ ] (?P<partitionername> .* )\s?\n
845
+ Snitch: [ ] (?P<snitchname>.*)\n|^\s*$
797
846
  \n
798
847
  '''
799
848
 
@@ -1001,7 +1050,7 @@ class TestCqlshOutput(BaseTestCase):
1001
1050
  ) WITH bloom_filter_fp_chance = 0.01
1002
1051
  AND caching = {{'keys': 'ALL', 'rows_per_partition': 'ALL'}}
1003
1052
  AND comment = ''
1004
- AND compaction = {{'class': 'SizeTieredCompactionStrategy'}}
1053
+ AND compaction = {{'class': '{self.default_compaction_strategy}'}}
1005
1054
  AND compression = {{'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}}
1006
1055
  AND crc_check_chance = 1.0
1007
1056
  AND dclocal_read_repair_chance = 0.0
@@ -1021,4 +1070,6 @@ class TestCqlshOutput(BaseTestCase):
1021
1070
  output = c.cmd_and_response(f"CREATE TABLE {qks}.ccc (pkey int, PRIMARY KEY(pkey)) WITH cdc = {{'enabled': true}};")
1022
1071
  self.assertEquals(output.strip(), "")
1023
1072
  output = c.cmd_and_response('describe table {}.ccc'.format(qks))
1024
- self.assertSequenceEqual(dedent(output).split('\n'), expected.split('\n'))
1073
+ lines = _normalize_response(dedent(output))
1074
+ expected_lines = _normalize_response(expected)
1075
+ self.assertTrue(expected_lines.issubset(lines), f"Output lines \n {{{lines}}} \n doesn't contain expected lines\n {{{expected_lines}}}")
@@ -9,4 +9,4 @@ build-backend = "setuptools.build_meta"
9
9
 
10
10
  [tool.setuptools_scm]
11
11
  write_to = "pylib/cqlshlib/_version.py"
12
- tag_regex = '^(?P<prefix>v)?(?P<version>[^\+-]+)(?P<suffix>-scylla)?$'
12
+ tag_regex = '^(?P<prefix>v)?(?P<version>[^\+-]+)(?P<suffix>-scylla)?$'
@@ -81,7 +81,7 @@ fi
81
81
 
82
82
  python3 -m pip install ${PIP_EXTRA_OPTS} build==0.10.0 wheel==0.37.1 -t ./build/cqlsh_build
83
83
  PYTHONPATH=$(pwd)/build/cqlsh_build python3 -m build -s
84
- PYTHONPATH=$(pwd)/build/cqlsh_build python3 -m pip download ${PIP_EXTRA_OPTS} --constraint ./requirements.txt --no-binary :all: . --no-build-isolation -d ./build/pypi_packages
84
+ PYTHONPATH=$(pwd)/build/cqlsh_build python3 -m pip download ${PIP_EXTRA_OPTS} --constraint ./requirements.txt --no-binary :all: --only-binary cython . -d ./build/pypi_packages
85
85
 
86
86
  for package in $(ls ./build/pypi_packages/*.tar.gz)
87
87
  do
@@ -1,5 +1,5 @@
1
1
  scylla-driver==3.26.5
2
2
  geomet==0.2.1.post1
3
- PyYAML==6.0
3
+ PyYAML==6.0.1
4
4
  click==8.1.3
5
5
 
@@ -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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes