(Improvement) Remove CQL binary protocol v3#686
(Improvement) Remove CQL binary protocol v3#686mykaul wants to merge 1 commit intoscylladb:masterfrom
Conversation
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>
59ebff4 to
3694533
Compare
|
I'm very proud of: |
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.
| return 4 | ||
|
|
||
|
|
||
| def get_supported_protocol_versions(): |
There was a problem hiding this comment.
get_supported_protocol_versions returns tuple of size 1 and tuple of size 2.
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.