Skip to content

Documentation (and other) updates for 3.29.0 #1194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
dist: xenial
dist: jammy
sudo: false

language: python
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"

env:
- CASS_DRIVER_NO_CYTHON=1
Expand All @@ -13,7 +14,7 @@ addons:
apt:
packages:
- build-essential
- python-dev
- python3-dev
- pypy-dev
- libc-ares-dev
- libev4
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
3.29.0
======
December 19, 2023

Features
--------
* Add support for Python 3.9 through 3.12, drop support for 3.7 (PYTHON-1283)
* Removal of dependency on six module (PR 1172)
* Raise explicit exception when deserializing a vector with a subtype that isn’t a constant size (PYTHON-1371)

Others
------
* Remove outdated Python pre-3.7 references (PR 1186)
* Remove backup(.bak) files (PR 1185)
* Fix doc typo in add_callbacks (PR 1177)

3.28.0
======
June 5, 2023
Expand Down
2 changes: 1 addition & 1 deletion README-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Use tee to capture logs and see them on your terminal::

Testing Multiple Python Versions
--------------------------------
If you want to test all of python 3.7, 3.8, and pypy, use tox (this is what
Use tox to test all of Python 3.8 through 3.12 and pypy (this is what
TravisCI runs)::

tox
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DataStax Driver for Apache Cassandra
A modern, `feature-rich <https://github.com/datastax/python-driver#features>`_ 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.7 and 3.8.
The driver supports Python 3.8 through 3.12.

**Note:** DataStax products do not support big-endian systems.

Expand Down
2 changes: 1 addition & 1 deletion cassandra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def emit(self, record):

logging.getLogger('cassandra').addHandler(NullHandler())

__version_info__ = (3, 28, 0)
__version_info__ = (3, 29, 0)
__version__ = '.'.join(map(str, __version_info__))


Expand Down
Empty file removed cassandra/scylla/cloud.py
Empty file.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Python client driver for `Apache Cassandra® <http://cassandra.apache.org>`_.
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.7 and 3.8.
The driver supports Python 3.8 through 3.12.

This driver is open source under the
`Apache v2 License <http://www.apache.org/licenses/LICENSE-2.0.html>`_.
Expand Down
15 changes: 9 additions & 6 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Installation

Supported Platforms
-------------------
Python 3.7 and 3.8 are supported. Both CPython (the standard Python
Python 3.8 through 3.12 are supported. Both CPython (the standard Python
implementation) and `PyPy <http://pypy.org>`_ are supported and tested.

Linux, OSX, and Windows are supported.
Expand All @@ -26,7 +26,7 @@ To check if the installation was successful, you can run::

python -c 'import cassandra; print cassandra.__version__'

It should print something like "3.27.0".
It should print something like "3.29.0".

.. _installation-datastax-graph:

Expand Down Expand Up @@ -215,12 +215,15 @@ dependencies, then use install-option::
sudo pip install --install-option="--no-cython"


Supported Event Loops
^^^^^^^^^^^^^^^^^^^^^
For Python versions before 3.12 the driver uses the ``asyncore`` module for its default
event loop. Other event loops such as ``libev``, ``gevent`` and ``eventlet`` are also
available via Python modules or C extensions. Python 3.12 has removed ``asyncore`` entirely
so for this platform one of these other event loops must be used.

libev support
^^^^^^^^^^^^^
The driver currently uses Python's ``asyncore`` module for its default
event loop. For better performance, ``libev`` is also supported through
a C extension.

If you're on Linux, you should be able to install libev
through a package manager. For example, on Debian/Ubuntu::

Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ def run_setup(extensions):
version=__version__,
description=' DataStax Driver for Apache Cassandra',
long_description=long_description,
long_description_content_type='text/x-rst',
url='http://github.com/datastax/python-driver',
project_urls={
'Documentation': 'https://docs.datastax.com/en/developer/python-driver/latest/',
Expand All @@ -438,8 +439,11 @@ def run_setup(extensions):
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules'
Expand Down
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pytz
sure
pure-sasl
twisted[tls]
gevent>=1.0
gevent
eventlet
cython>=0.20,<0.30
packaging
futurist; python_version >= '3.7'
futurist
asynctest
4 changes: 3 additions & 1 deletion tests/unit/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import unittest

import logging
import socket

from mock import patch, Mock

Expand Down Expand Up @@ -88,8 +89,9 @@ class ClusterTest(unittest.TestCase):

def test_tuple_for_contact_points(self):
cluster = Cluster(contact_points=[('localhost', 9045), ('127.0.0.2', 9046), '127.0.0.3'], port=9999)
localhost_addr = set([addr[0] for addr in [t for (_,_,_,_,t) in socket.getaddrinfo("localhost",80)]])
for cp in cluster.endpoints_resolved:
if cp.address in ('::1', '127.0.0.1'):
if cp.address in localhost_addr:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changes in this file intended to address PYTHON-1373

self.assertEqual(cp.port, 9045)
elif cp.address == '127.0.0.2':
self.assertEqual(cp.port, 9046)
Expand Down
19 changes: 7 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
[tox]
envlist = py{37,38},pypy
envlist = py{38,39,310,311,312},pypy

[base]
deps = nose
mock<=1.0.1
deps = pynose
mock>1.1
packaging
cython
cython>=0.20,<0.30
eventlet
twisted <15.5.0
gevent
twisted[tls]
pure-sasl
kerberos
futurist
greenlet>=0.4.14,<0.4.17
lz4
cryptography>=35.0
lz4_dependency = py37,py38: lz4

[testenv]
deps = {[base]deps}
{[base]lz4_dependency}

setenv = LIBEV_EMBED=0
CARES_EMBED=0
Expand All @@ -28,8 +27,6 @@ commands = nosetests --verbosity=2 --no-path-adjustment {toxinidir}/tests/unit/

[testenv:gevent_loop]
deps = {[base]deps}
{[base]lz4_dependency}
gevent>=1.4,<1.5

setenv = LIBEV_EMBED=0
CARES_EMBED=0
Expand All @@ -41,8 +38,6 @@ commands =

[testenv:eventlet_loop]
deps = {[base]deps}
{[base]lz4_dependency}
gevent>=1.4,<1.5

setenv = LIBEV_EMBED=0
CARES_EMBED=0
Expand Down