From 02e93d605c8d615c3c420b9186c3e39bcf27a09a Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Thu, 19 Mar 2026 16:37:24 -0500 Subject: [PATCH 1/7] Changelog updates for 3.30.0 --- CHANGELOG.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6da84ae7a4..a8d6cb53f7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,26 @@ +3.30.0 +====== +March 23, 2026 + +Features +-------- +* Introduce pyproject.toml to explicitly declare build dependencies (CASSPYTHON-7) +* Add Python 3.14 to CI, remove Python 3.9 (CASSPYTHON-4) +* Mark eventlet, gevent and Twisted event loops as deprecated (CASSPYTHON-12) + +Bug Fixes +--------- +* Do not set timeout to None when calling execute_async in execute_concurrent (PYTHON-1354) +* No C extension .so files in published binary Python whl packages of 3.29.3 (CASSPYTHON-3) +* Win32 wheels do not include compiled libev modules (CASSPYTHON-5) + +Others +------ +* Remove obsolete __future__ import absolute_import (PR 1263) +* Remove ez_setup for compatibility with setuptools v82 (PR 1268) +* Replace usage of with await lock (PR 1270) +* Update cassandra.util.Version to better support Cassandra version strings (CASSPYTHON-10) + 3.29.3 ====== October 20, 2025 From b152bef4a5ff3a5b0b4d34aaa8de55f2e248a2f8 Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Thu, 19 Mar 2026 16:58:34 -0500 Subject: [PATCH 2/7] Update install notes to be consistent with introduction of pyproject.toml --- docs/installation.rst | 49 +++++++++---------------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 12c0ad300b..90639d8fb0 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -99,15 +99,9 @@ process can take a long time -- as long as 10 minutes in some environments. In environments where performance is less important, it may be worth it to :ref:`disable Cython as documented below `. -You can also use ``CASS_DRIVER_BUILD_CONCURRENCY`` to increase the number of -threads used to build the driver and any C extensions: +You can also use ``build-concurrency`` key in the ``tool.cassandra-driver`` table of pyproject.toml to +increase the number of threads used to build the driver and any C extensions. -.. code-block:: bash - - $ # installing from source - $ CASS_DRIVER_BUILD_CONCURRENCY=8 python setup.py install - $ # installing from pip - $ CASS_DRIVER_BUILD_CONCURRENCY=8 pip install cassandra-driver OSX Installation Error ^^^^^^^^^^^^^^^^^^^^^^ @@ -161,9 +155,10 @@ for token-aware routing with the ``Murmur3Partitioner``, `libev `_ event loop integration, and Cython optimized extensions. -When installing manually through setup.py, you can disable both with -the ``--no-extensions`` option, or selectively disable them with -with ``--no-murmur3``, ``--no-libev``, or ``--no-cython``. +When installing manually these options can be disabled by changing the corresponding +key in the ``tool.cassandra-driver`` table of pyproject.toml to "false". Please consult +the ``build-murmur3-extension``, ``build-libev-extension`` and ``build-cython-extensions`` +keys (respectively) to disable these extensions. To compile the extensions, ensure that GCC and the Python headers are available. @@ -184,36 +179,12 @@ See :ref:`windows_build` for notes on configuring the build environment on Windo Cython-based Extensions ~~~~~~~~~~~~~~~~~~~~~~~ By default, this package uses `Cython `_ to optimize core modules and build custom extensions. -This is not a hard requirement, but is engaged by default to build extensions offering better performance than the +This is not a hard requirement, but is enabled by default to build extensions offering better performance than the pure Python implementation. -This is a costly build phase, especially in clean environments where the Cython compiler must be built -This build phase can be avoided using the build switch, or an environment variable:: - - python setup.py install --no-cython - -Alternatively, an environment variable can be used to switch this option regardless of -context:: - - CASS_DRIVER_NO_CYTHON=1 - - or, to disable all extensions: - CASS_DRIVER_NO_EXTENSIONS=1 - -This method is required when using pip, which provides no other way of injecting user options in a single command:: - - CASS_DRIVER_NO_CYTHON=1 pip install cassandra-driver - CASS_DRIVER_NO_CYTHON=1 sudo -E pip install ~/python-driver - -The environment variable is the preferred option because it spans all invocations of setup.py, and will -prevent Cython from being materialized as a setup requirement. - -If your sudo configuration does not allow SETENV, you must push the option flag down via pip. However, pip -applies these options to all dependencies (which break on the custom flag). Therefore, you must first install -dependencies, then use install-option:: - - sudo pip install futures - sudo pip install --install-option="--no-cython" - +This process does take some time, however, so if you wish to build without generating these extensions using +Cython you can do so by changing the ``build-cython-extensions`` key in the ``tool.cassandra-driver`` table of pyproject.toml. +By default this key is set to "true"; simply changing it to "false" will disable all Cython functionality. Supported Event Loops ^^^^^^^^^^^^^^^^^^^^^ From f0b50c0ad95bb3d0eab41e877a6ab7d5a4d29736 Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Fri, 20 Mar 2026 12:43:18 -0500 Subject: [PATCH 3/7] Update supported Python versions --- README.rst | 2 +- docs/installation.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 47b5593ee9..da998967ea 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ Apache Cassandra Python Driver A modern, `feature-rich `_ and highly-tunable Python client library for Apache Cassandra (2.1+) and DataStax Enterprise (4.7+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3. -The driver supports Python 3.9 through 3.13. +The driver supports Python 3.10 through 3.14. **Note:** DataStax products do not support big-endian systems. diff --git a/docs/installation.rst b/docs/installation.rst index 90639d8fb0..efa9fb18b4 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -3,7 +3,7 @@ Installation Supported Platforms ------------------- -Python 3.9 through 3.13 are supported. Both CPython (the standard Python +Python 3.10 through 3.14 are supported. Both CPython (the standard Python implementation) and `PyPy `_ are supported and tested. Linux, OSX, and Windows are supported. @@ -24,9 +24,9 @@ Verifying your Installation --------------------------- To check if the installation was successful, you can run:: - python -c 'import cassandra; print(cassandra.__version__)' + python -c 'import cassandra; print(cassandra.ProtocolVersion.SUPPORTED_VERSIONS)' -It should print something like "3.29.3". +This command should print something like "(66, 65, 6, 5, 4, 3, 2, 1)". .. _installation-datastax-graph: From 690c1dc07a992aadc2f61fd93be714a72900a3f8 Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Mon, 23 Mar 2026 13:45:08 -0500 Subject: [PATCH 4/7] Code review feedback --- docs/installation.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index efa9fb18b4..1e55537176 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -91,7 +91,6 @@ details at `PYTHON-1351 ` Speeding Up Installation ^^^^^^^^^^^^^^^^^^^^^^^^ - By default, installing the driver through ``pip`` uses a pre-compiled, platform-specific wheel when available. If using a source distribution rather than a wheel, Cython is used to compile certain parts of the driver. This makes those hot paths faster at runtime, but the Cython compilation @@ -99,9 +98,11 @@ process can take a long time -- as long as 10 minutes in some environments. In environments where performance is less important, it may be worth it to :ref:`disable Cython as documented below `. -You can also use ``build-concurrency`` key in the ``tool.cassandra-driver`` table of pyproject.toml to -increase the number of threads used to build the driver and any C extensions. +Cython also supports concurrent builds of native extensions. The ``build-concurrency`` key in the +``tool.cassandra-driver`` table of pyproject.toml is an integer value which specifies the number of +concurrent builds Cython may execute. The value for this key must be a non-negative integer; the default is zero, +indicating no concurrent builds. The ``multiprocessing`` module must be installed if concurrent builds are used. OSX Installation Error ^^^^^^^^^^^^^^^^^^^^^^ @@ -143,7 +144,6 @@ Once the dependencies are installed, simply run:: python setup.py install - (*Optional*) Non-python Dependencies ------------------------------------ The driver has several **optional** features that have non-Python dependencies. @@ -156,7 +156,7 @@ for token-aware routing with the ``Murmur3Partitioner``, and Cython optimized extensions. When installing manually these options can be disabled by changing the corresponding -key in the ``tool.cassandra-driver`` table of pyproject.toml to "false". Please consult +key in the ``tool.cassandra-driver`` table of pyproject.toml to ``false``. Please consult the ``build-murmur3-extension``, ``build-libev-extension`` and ``build-cython-extensions`` keys (respectively) to disable these extensions. @@ -184,7 +184,7 @@ pure Python implementation. This process does take some time, however, so if you wish to build without generating these extensions using Cython you can do so by changing the ``build-cython-extensions`` key in the ``tool.cassandra-driver`` table of pyproject.toml. -By default this key is set to "true"; simply changing it to "false" will disable all Cython functionality. +By default this key is set to ``true``; simply changing it to ``false`` will disable all Cython functionality. Supported Event Loops ^^^^^^^^^^^^^^^^^^^^^ From 9dc7bc968f2ce2a3139c5e61b42b86ed30a42c18 Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Mon, 23 Mar 2026 14:05:55 -0500 Subject: [PATCH 5/7] Revert back to testing cassandra.__version__ --- docs/installation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 1e55537176..721de52f2c 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -24,9 +24,9 @@ Verifying your Installation --------------------------- To check if the installation was successful, you can run:: - python -c 'import cassandra; print(cassandra.ProtocolVersion.SUPPORTED_VERSIONS)' + python -c 'import cassandra; print(cassandra.__version__)' -This command should print something like "(66, 65, 6, 5, 4, 3, 2, 1)". +This command should print something like ``3.30.0``. .. _installation-datastax-graph: From dbf808e05dd965da8ccd3de9dabeef0bf082725e Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Mon, 23 Mar 2026 14:19:30 -0500 Subject: [PATCH 6/7] Update source install command to work with pyproject.toml --- docs/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 721de52f2c..95a2c797f5 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -142,7 +142,7 @@ installed. You can find the list of dependencies in Once the dependencies are installed, simply run:: - python setup.py install + pip install . (*Optional*) Non-python Dependencies ------------------------------------ From 8c603151883565b4d47b12836ac38dc742860f4a Mon Sep 17 00:00:00 2001 From: absurdfarce Date: Mon, 23 Mar 2026 15:03:12 -0500 Subject: [PATCH 7/7] Code review feedback --- README-dev.rst | 8 ++++---- docs/index.rst | 2 +- docs/installation.rst | 11 ++++++----- tox.ini | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README-dev.rst b/README-dev.rst index 939d3fa480..3f8789cb81 100644 --- a/README-dev.rst +++ b/README-dev.rst @@ -75,7 +75,7 @@ Running Integration Tests ------------------------- In order to run integration tests, you must specify a version to run using the ``CASSANDRA_VERSION`` or ``DSE_VERSION`` environment variable:: - CASSANDRA_VERSION=2.0.9 pytest tests/integration/standard + CASSANDRA_VERSION=4.0.1 pytest tests/integration/standard Or you can specify a cassandra directory (to test unreleased versions):: @@ -85,7 +85,7 @@ Specifying the usage of an already running Cassandra cluster ------------------------------------------------------------ The test will start the appropriate Cassandra clusters when necessary but if you don't want this to happen because a Cassandra cluster is already running the flag ``USE_CASS_EXTERNAL`` can be used, for example:: - USE_CASS_EXTERNAL=1 CASSANDRA_VERSION=2.0.9 pytest tests/integration/standard + USE_CASS_EXTERNAL=1 CASSANDRA_VERSION=4.0.1 pytest tests/integration/standard Specify a Protocol Version for Tests ------------------------------------ @@ -96,7 +96,7 @@ it with the ``PROTOCOL_VERSION`` environment variable:: Testing Multiple Python Versions -------------------------------- -Use tox to test all of Python 3.9 through 3.13 and pypy:: +Use tox to test all of Python 3.10 through 3.14 and pypy:: tox @@ -106,7 +106,7 @@ Running the Benchmarks ====================== There needs to be a version of cassandra running locally so before running the benchmarks, if ccm is installed: - ccm create benchmark_cluster -v 3.0.1 -n 1 -s + ccm create benchmark_cluster -v 4.0.1 -n 1 -s To run the benchmarks, pick one of the files under the ``benchmarks/`` dir and run it:: diff --git a/docs/index.rst b/docs/index.rst index 2fcaf43884..0f0e9edad6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,7 +4,7 @@ A Python client driver for `Apache Cassandra® `_. This driver works exclusively with the Cassandra Query Language v3 (CQL3) and Cassandra's native protocol. Cassandra 2.1+ is supported, including DSE 4.7+. -The driver supports Python 3.9 through 3.13. +The driver supports Python 3.10 through 3.14. This driver is open source under the `Apache v2 License `_. diff --git a/docs/installation.rst b/docs/installation.rst index 95a2c797f5..a0a5e25dab 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -62,8 +62,8 @@ just run ``apt-get install python-snappy``.) (*Optional*) Metrics Support ---------------------------- The driver has built-in support for capturing :attr:`.Cluster.metrics` about -the queries you run. However, the ``scales`` library is required to -support this:: +the queries you run. Note that the ``scales`` module is required to +support metrics. This module is available from Pypi and can be installed with:: pip install scales @@ -102,7 +102,8 @@ In environments where performance is less important, it may be worth it to Cython also supports concurrent builds of native extensions. The ``build-concurrency`` key in the ``tool.cassandra-driver`` table of pyproject.toml is an integer value which specifies the number of concurrent builds Cython may execute. The value for this key must be a non-negative integer; the default is zero, -indicating no concurrent builds. The ``multiprocessing`` module must be installed if concurrent builds are used. +indicating no concurrent builds. Note that Cython's concurrent builds use the standard ``multiprocessing`` package +so this library must be availble is concurrent builds are used. OSX Installation Error ^^^^^^^^^^^^^^^^^^^^^^ @@ -155,7 +156,7 @@ for token-aware routing with the ``Murmur3Partitioner``, `libev `_ event loop integration, and Cython optimized extensions. -When installing manually these options can be disabled by changing the corresponding +Some or all of these native extensions can be disabled by changing the corresponding key in the ``tool.cassandra-driver`` table of pyproject.toml to ``false``. Please consult the ``build-murmur3-extension``, ``build-libev-extension`` and ``build-cython-extensions`` keys (respectively) to disable these extensions. @@ -221,7 +222,7 @@ install libev using any Windows package manager. For example, to install using $ vcpkg install libev If successful, you should be able to build and install the extension -(just using ``setup.py build`` or ``setup.py install``) and then use +(just using ``pip install`` or ``pip install -e``) and then use the libev event loop by doing the following: .. code-block:: python diff --git a/tox.ini b/tox.ini index e77835f0da..19e610616e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{39,310,311,312,313},pypy +envlist = py{310,311,312,313,314},pypy [base] deps = pytest