Skip to content

(Improvement) Remove CQL binary protocol v3#686

Draft
mykaul wants to merge 1 commit intoscylladb:masterfrom
mykaul:remove_proto_v3_clean
Draft

(Improvement) Remove CQL binary protocol v3#686
mykaul wants to merge 1 commit intoscylladb:masterfrom
mykaul:remove_proto_v3_clean

Conversation

@mykaul
Copy link

@mykaul mykaul commented Feb 2, 2026

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

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

@mykaul mykaul marked this pull request as draft February 2, 2026 21:56
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>
@mykaul mykaul force-pushed the remove_proto_v3_clean branch from 59ebff4 to 3694533 Compare February 3, 2026 11:54
@mykaul
Copy link
Author

mykaul commented Feb 3, 2026

I'm very proud of:

+472 −1,193 

@Lorak-mmk
Copy link

@mykaul Could you please discuss next steps for that with @roydahan ?
On last team call we raised the idea to remove protocol v3, first from matrix, then from driver and scylla.
Roy's concern is that it should be done with a proper depreciation announcements, making sure then no one uses it etc.

@mykaul
Copy link
Author

mykaul commented Feb 4, 2026

@mykaul Could you please discuss next steps for that with @roydahan ? On last team call we raised the idea to remove protocol v3, first from matrix, then from driver and scylla. Roy's concern is that it should be done with a proper depreciation announcements, making sure then no one uses it etc.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_VERSIONS tuple to (V5, V4)
  • Removed protocol_version parameter from all serialize() and deserialize() 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():
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_supported_protocol_versions returns tuple of size 1 and tuple of size 2.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants