Add working support for Python 3.12 to Travis CI builds

Description

Work being done on PYTHON-1297: Update python test framework from nose to pytestResolved should add Python 3.11 to the set of tested runtimes for Travis CI builds. Python 3.12 should be added there as well but we need some additional work there to handle the inability to select a default runtime given the removal of asyncore. For now you get lots of this kind of thing in Travis builds with Python 3.12:

py312 run-test: commands[0] | pytest -v /home/travis/build/datastax/python-driver/tests/unit/ ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.2.2, pluggy-1.5.0 -- /home/travis/build/datastax/python-driver/.tox/py312/bin/python cachedir: .tox/py312/.pytest_cache rootdir: /home/travis/build/datastax/python-driver collected 394 items / 13 errors ==================================== ERRORS ==================================== ________ ERROR collecting tests/unit/advanced/test_execution_profile.py ________ ../../../tests/unit/advanced/test_execution_profile.py:17: in <module> from cassandra.cluster import GraphExecutionProfile, GraphAnalyticsExecutionProfile ../../../cassandra/cluster.py:173: in <module> raise DependencyException("Unable to load a default connection class", excs) E cassandra.DependencyException: Unable to load a default connection class E The following exceptions were observed: E - The C extension needed to use libev was not found. This probably means that you didn't have the required build dependencies when installing the driver. See http://datastax.github.io/python-driver/installation.html#c-extensions for instructions on installing build dependencies and building the C extension. E - Unable to import asyncore module. Note that this module has been removed in Python 3.12 so when using the driver with this version (or anything newer) you will need to use one of the other event loop implementations.

 

Pretty sure we just need some tox config work to pass EVENT_LOOP in for Python 3.12.

Environment

None

Pull Requests

None

Activity

Show:

Details

Assignee

Reporter

Priority

Created July 16, 2024 at 3:26 PM
Updated July 16, 2024 at 3:26 PM

Flag notifications