From a38582d7e0d11e59937707ca2b59b7900e498f90 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 24 Apr 2026 14:09:19 +0000 Subject: [PATCH 1/4] chore: Use `pip install -e .` instead of `python setup.py develop` Python 3.12 no longer ships setuptools (or distutils) by default, so `python setup.py develop` will fail with ModuleNotFoundError before any tests run -- and `setup.py develop` has been deprecated since setuptools 58 (2021) anyway. Switch to `pip install -e .`, the supported replacement, which pulls in setuptools as a build dependency automatically, so it works on every Python version in the matrix. --- .ci-before-script.sh | 2 +- .ci-runs-tests.sh | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci-before-script.sh b/.ci-before-script.sh index 1c8e654..6cfba8d 100755 --- a/.ci-before-script.sh +++ b/.ci-before-script.sh @@ -2,7 +2,7 @@ set -ex python -m pip install --upgrade pip -pip install -r requirements_test.txt && python setup.py develop +pip install -r requirements_test.txt && pip install -e . if [ "$STEP" != "tests" ]; then exit 0 diff --git a/.ci-runs-tests.sh b/.ci-runs-tests.sh index 3e6f4fe..799b14e 100755 --- a/.ci-runs-tests.sh +++ b/.ci-runs-tests.sh @@ -4,7 +4,7 @@ env if [ "$STEP" = "tests" ]; then py.test --version export PYTHONPATH=. - python setup.py develop + pip install -e . py.test --cov=bmemcached exit 0 fi diff --git a/tox.ini b/tox.ini index a7d5311..89c7575 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,6 @@ envlist = py27,py34,py35,py36,py37,py38,py39,py310 [testenv] deps = -rrequirements_test.txt -commands = python setup.py develop +commands = pip install -e . py.test -s flake8 From cc4ca98cd0ca42c7cc0e21564a4a2e74e05150ae Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 24 Apr 2026 14:00:08 +0000 Subject: [PATCH 2/4] ci: drop Python 3.7, add 3.12 to the test matrix ubuntu-latest is now Ubuntu 24.04, which actions/setup-python no longer ships a prebuilt Python 3.7 interpreter for. 3.7 has been EOL since June 2023. Add 3.12 in its place to keep coverage current. --- .github/workflows/tests-and-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-and-lint.yml b/.github/workflows/tests-and-lint.yml index 39bd99c..dcd7aa9 100644 --- a/.github/workflows/tests-and-lint.yml +++ b/.github/workflows/tests-and-lint.yml @@ -12,7 +12,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9, "3.10", 3.11] + python-version: [3.8, 3.9, "3.10", 3.11, 3.12] steps: - uses: actions/checkout@v2 From 39bf51087c337e5b30dad383a511b26c78d63b73 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 24 Apr 2026 14:00:22 +0000 Subject: [PATCH 3/4] chore: Update setup.py classifiers to match the tested Python versions Drop the 2.7/3.4/3.5/3.6/3.7 classifiers -- they are all EOL and now untested. Add 3.10/3.11/3.12 so the classifiers reflect the versions actually exercised in CI. --- setup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index ce0b628..17ebd1d 100644 --- a/setup.py +++ b/setup.py @@ -25,13 +25,11 @@ def read(filename): "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "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", ], install_requires=[ "six", From cda638855578051dc5943459b8c67bc490c21d4a Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 24 Apr 2026 14:00:33 +0000 Subject: [PATCH 4/4] chore: Align tox envlist with the CI Python matrix Drop py27/py34/py35/py36/py37 (which are all EOL, and no longer tested in CI) and add py311/py312, so `tox` locally runs the same set of versions as CI. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 89c7575..e313b34 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py34,py35,py36,py37,py38,py39,py310 +envlist = py38,py39,py310,py311,py312 [testenv] deps = -rrequirements_test.txt commands = pip install -e .