Skip to content

Commit b1fb07d

Browse files
committed
Remove DSE only continuous_paging_options feature
I'm not removing it entirely from the code, but ignoring it where it matters, so it's essentially useless. I think it's a reasonable balance between breaking the API of some classes and removal of the feature. Signed-off-by: Yaniv Kaul <[email protected]>
1 parent a2a6c42 commit b1fb07d

File tree

4 files changed

+0
-58
lines changed

4 files changed

+0
-58
lines changed

cassandra/cluster.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4498,7 +4498,6 @@ class ResponseFuture(object):
44984498
_timer = None
44994499
_protocol_handler = ProtocolHandler
45004500
_spec_execution_plan = NoSpeculativeExecutionPlan()
4501-
_continuous_paging_options = None
45024501
_continuous_paging_session = None
45034502
_host = None
45044503

cassandra/protocol.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ def __init__(self, query_params, consistency_level,
553553
self.paging_state = paging_state
554554
self.timestamp = timestamp
555555
self.skip_meta = skip_meta
556-
self.continuous_paging_options = continuous_paging_options
557556
self.keyspace = keyspace
558557

559558
def _write_query_params(self, f, protocol_version):
@@ -574,10 +573,6 @@ def _write_query_params(self, f, protocol_version):
574573
if self.timestamp is not None:
575574
flags |= _PROTOCOL_TIMESTAMP_FLAG
576575

577-
if self.continuous_paging_options:
578-
raise UnsupportedOperation(
579-
"Continuous paging may only be used with future protocol versions")
580-
581576
if self.keyspace is not None:
582577
if ProtocolVersion.uses_keyspace_flag(protocol_version):
583578
flags |= _WITH_KEYSPACE_FLAG
@@ -605,8 +600,6 @@ def _write_query_params(self, f, protocol_version):
605600
write_long(f, self.timestamp)
606601
if self.keyspace is not None:
607602
write_string(f, self.keyspace)
608-
if self.continuous_paging_options:
609-
self._write_paging_options(f, self.continuous_paging_options, protocol_version)
610603

611604
def _write_paging_options(self, f, paging_options, protocol_version):
612605
write_int(f, paging_options.max_pages)

tests/integration/standard/test_custom_protocol_handler.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -121,37 +121,6 @@ def test_custom_raw_row_results_all_types(self):
121121
assert len(CustomResultMessageTracked.checked_rev_row_set) == len(PRIMITIVE_DATATYPES)-1
122122
cluster.shutdown()
123123

124-
@unittest.expectedFailure
125-
@greaterthanorequalcass40
126-
def test_protocol_divergence_v5_fail_by_continuous_paging(self):
127-
"""
128-
Test to validate that V5 and DSE_V1 diverge. ContinuousPagingOptions is not supported by V5
129-
130-
@since DSE 2.0b3 GRAPH 1.0b1
131-
@jira_ticket PYTHON-694
132-
@expected_result NoHostAvailable will be risen when the continuous_paging_options parameter is set
133-
134-
@test_category connection
135-
"""
136-
cluster = TestCluster(protocol_version=ProtocolVersion.V5, allow_beta_protocol_version=True)
137-
session = cluster.connect()
138-
139-
max_pages = 4
140-
max_pages_per_second = 3
141-
continuous_paging_options = ContinuousPagingOptions(max_pages=max_pages,
142-
max_pages_per_second=max_pages_per_second)
143-
144-
future = self._send_query_message(session, timeout=session.default_timeout,
145-
consistency_level=ConsistencyLevel.ONE,
146-
continuous_paging_options=continuous_paging_options)
147-
148-
# This should raise NoHostAvailable because continuous paging is not supported under ProtocolVersion.DSE_V1
149-
with pytest.raises(NoHostAvailable) as context:
150-
future.result()
151-
assert "Continuous paging may only be used with protocol version ProtocolVersion.DSE_V1 or higher" in str(context.value)
152-
153-
cluster.shutdown()
154-
155124
@greaterthanorequalcass30
156125
def test_protocol_divergence_v4_fail_by_flag_uses_int(self):
157126
"""

tests/unit/test_protocol.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,6 @@ def test_query_message(self):
9191
def _check_calls(self, io, expected):
9292
assert tuple(c[1] for c in io.write.mock_calls) == tuple(expected)
9393

94-
def test_continuous_paging(self):
95-
"""
96-
Test to check continuous paging throws an Exception as it's not supported
97-
@since DSE 2.0b3 GRAPH 1.0b1
98-
@jira_ticket PYTHON-694
99-
@expected_result the values are correctly written
100-
101-
@test_category connection
102-
"""
103-
max_pages = 4
104-
max_pages_per_second = 3
105-
continuous_paging_options = ContinuousPagingOptions(max_pages=max_pages,
106-
max_pages_per_second=max_pages_per_second)
107-
message = QueryMessage("a", 3, continuous_paging_options=continuous_paging_options)
108-
io = Mock()
109-
for version in ProtocolVersion.SUPPORTED_VERSIONS:
110-
with pytest.raises(UnsupportedOperation):
111-
message.send_body(io, version)
112-
11394
def test_prepare_flag(self):
11495
"""
11596
Test to check the prepare flag is properly set, This should only happen for V5 at the moment.

0 commit comments

Comments
 (0)