Uh oh!
There was an error while loading. Please reload this page.
(Improvement) Remove CQL binary protocol v3 - #686
Conversation
59ebff4 to
3694533Comparemykaul
commented
Feb 3, 2026
I'm very proud of: |
Lorak-mmk
commented
Feb 4, 2026
mykaul
commented
Feb 4, 2026
In theory, you are right. In practice - Scylla uses and supports v4, who is going to use v3 against it? and if they do, why would they upgrade their driver? but generally - fair point - we need to deprecate it in docs or something first. I'll get it to 2026.1 hopefully. |
There was a problem hiding this comment.
Pull request overview
This pull request removes support for CQL binary protocol v3, establishing v4 as the minimum supported protocol version. This change assumes that all reasonable versions of Cassandra (2.2+) and ScyllaDB support protocol v4 or higher.
Changes:
- Removed protocol version 3 constant and updated
SUPPORTED_VERSIONStuple to (V5, V4) - Removed
protocol_versionparameter from allserialize()anddeserialize()methods across the codebase - Removed deprecated credentials-based authentication (protocol v1 only) in favor of SASL-based authentication
- Updated tests to remove protocol v3-specific test cases and version checks
- Updated documentation examples to use protocol_version=4 instead of protocol_version=3
Reviewed changes
Copilot reviewed 71 out of 71 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cassandra/init.py | Removed V3 constant and updated SUPPORTED_VERSIONS tuple |
| cassandra/protocol.py | Removed CredentialsMessage class and updated message handling to remove protocol_version checks |
| cassandra/query.py | Removed protocol_version from PreparedStatement and BoundStatement parameter handling |
| cassandra/cqltypes.py | Removed protocol_version parameter from serialize/deserialize methods and removed internal version checks |
| cassandra/cluster.py | Updated auth_provider validation and user type registration to remove protocol version checks |
| cassandra/connection.py | Removed credentials-based authentication flow, keeping only SASL authentication |
| cassandra/util.py | Removed protocol_version from OrderedMapSerializedKey constructor and methods |
| cassandra/.pyx/.pxd | Removed protocol_version from Cython deserializers and parsers |
| tests/unit/*.py | Updated unit tests to remove protocol v3-specific test cases and protocol_version parameters |
| tests/integration/*.py | Removed version checks for Cassandra < 2.2 and updated helper functions to return v4 as minimum |
| docs/*.rst | Updated documentation examples to use protocol_version=4 |
| CONTRIBUTING.rst | Updated protocol version defaults documentation |
Comments suppressed due to low confidence (1)
tests/integration/standard/test_metadata.py:48
- Import of 'get_supported_protocol_versions' is not used.
Import of 'greaterthanorequalcass40' is not used.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
3694533 to
32d5e69Comparemykaul
commented
Feb 6, 2026
Very odd that some additional unit tests failed (on my laptop) and not on CI :-/ |
mykaul
commented
Feb 6, 2026
test_idle_heartbeat failure doesn't look related... Investigating. |
No one needs it anymore. Any reasonable version of Cassandra and ScyllaDB support CQL binary protocol v4 (or higher). This also assume that we test against Cassandra 2.2 or above, so removed some <= 2.1 items. Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
32d5e69 to
4856d8cCompareImportant Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
mykaul
commented
Jul 29, 2026
Rebased onto current
Not redundant with master's Kept as draft per the open discussion above about coordinating a deprecation announcement before merging. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 68 out of 68 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
tests/unit/test_parameter_binding.py:199
- These empty protocol subclasses now inherit exactly the same setup and tests, so unittest/pytest collects and executes the entire binding suite three times with no version-specific coverage. Since the protocol field and overrides were removed, collapse this to a single test class (and rename the remaining
V3class) instead of retaining duplicate V4/V5 subclasses.
cassandra/init.py:168 - This changes the driver's minimum supported native protocol (and therefore minimum Cassandra version) but the
Unreleasedchangelog has no entry for it. The same changelog already calls out contracted signature changes (CHANGELOG.rst:12-24); please add a compatibility note covering the v4 minimum and the removed serialization/custom-handler arguments so users can assess the upgrade impact.
SUPPORTED_VERSIONS = (V5, V4)
"""
A tuple of all supported protocol versions for ScyllaDB.
cassandra/cqltypes.py:328
- Removing the protocol argument here leaves
AES256ColumnEncryptionPolicy.encode_and_encrypt()calling the old signature ascoldata.type.serialize(obj, None)(cassandra/column_encryption/_policies.py:117). Every use of that helper now raisesTypeErrorbefore encryption; update the caller and its coverage, or retain a backward-compatible ignored argument.
def serialize(val):
cassandra/cqltypes.py:318
- The Cassandra 2.2 aggregate metadata parser still calls
cass_state_type.deserialize(initial_condition, 3)incassandra/metadata.py:2208. With this one-argument signature, reading metadata for an aggregate with an initial condition raisesTypeError; update that parser call (and its test) or keep an ignored compatibility argument.
def deserialize(byts):
No one needs it anymore. Any reasonable version of Cassandra and ScyllaDB support CQL binary protocol v4 (or higher).
This also assume that we test against Cassandra 2.2 or above, so removed some <= 2.1 items.
Pre-review checklist
./docs/source/.Fixes:annotations to PR description.