Skip to content

Commit 574266d

Browse files
committed
Remove deprecated Cluster.submit_schema_refresh
1 parent 419fcdf commit 574266d

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

cassandra/cluster.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,24 +1225,6 @@ def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregat
12251225
return SchemaTargetType.KEYSPACE
12261226
return None
12271227

1228-
def submit_schema_refresh(self, keyspace=None, table=None, usertype=None, function=None, aggregate=None):
1229-
"""
1230-
.. deprecated:: 2.6.0
1231-
Use refresh_*_metadata instead
1232-
1233-
Schedule a refresh of the internal representation of the current
1234-
schema for this cluster. See :meth:`~.refresh_schema` for description of parameters.
1235-
"""
1236-
msg = "submit_schema_refresh is deprecated. Use Cluster.refresh_*_metadata instead."
1237-
warnings.warn(msg, DeprecationWarning)
1238-
log.warning(msg)
1239-
1240-
self._validate_refresh_schema(keyspace, table, usertype, function, aggregate)
1241-
target_type = self._target_type_from_refresh_args(keyspace, table, usertype, function, aggregate)
1242-
return self.executor.submit(
1243-
self.control_connection.refresh_schema, target_type=target_type, keyspace=keyspace, table=table,
1244-
type=usertype, function=function, aggregate=aggregate)
1245-
12461228
def refresh_schema_metadata(self, max_schema_agreement_wait=None):
12471229
"""
12481230
Synchronously refresh all schema metadata.

tests/integration/standard/test_cluster.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -254,32 +254,6 @@ def test_cluster_settings(self):
254254
cluster.set_max_connections_per_host(HostDistance.LOCAL, max_connections_per_host + 1)
255255
self.assertEqual(cluster.get_max_connections_per_host(HostDistance.LOCAL), max_connections_per_host + 1)
256256

257-
def test_submit_schema_refresh(self):
258-
"""
259-
Ensure new new schema is refreshed after submit_schema_refresh()
260-
"""
261-
262-
cluster = Cluster(protocol_version=PROTOCOL_VERSION)
263-
cluster.connect()
264-
self.assertNotIn("newkeyspace", cluster.metadata.keyspaces)
265-
266-
other_cluster = Cluster(protocol_version=PROTOCOL_VERSION)
267-
session = other_cluster.connect()
268-
execute_until_pass(session,
269-
"""
270-
CREATE KEYSPACE newkeyspace
271-
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}
272-
""")
273-
274-
future = cluster.submit_schema_refresh()
275-
future.result()
276-
277-
self.assertIn("newkeyspace", cluster.metadata.keyspaces)
278-
279-
execute_until_pass(session, "DROP KEYSPACE newkeyspace")
280-
cluster.shutdown()
281-
other_cluster.shutdown()
282-
283257
def test_refresh_schema(self):
284258
cluster = Cluster(protocol_version=PROTOCOL_VERSION)
285259
session = cluster.connect()
@@ -605,10 +579,6 @@ def test_pool_management(self):
605579
cluster.refresh_schema_metadata()
606580
cluster.refresh_schema_metadata(max_schema_agreement_wait=0)
607581

608-
# submit schema refresh
609-
future = cluster.submit_schema_refresh()
610-
future.result()
611-
612582
assert_quiescent_pool_state(self, cluster)
613583

614584
cluster.shutdown()

0 commit comments

Comments
 (0)