Skip to content

Commit b40f7fd

Browse files
authored
Drop 3.7 support, add 3.12 support. (#262)
* 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: 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. * 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. * 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.
1 parent 6cdc678 commit b40f7fd

5 files changed

Lines changed: 8 additions & 10 deletions

File tree

.ci-before-script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -ex
33

44
python -m pip install --upgrade pip
5-
pip install -r requirements_test.txt && python setup.py develop
5+
pip install -r requirements_test.txt && pip install -e .
66

77
if [ "$STEP" != "tests" ]; then
88
exit 0

.ci-runs-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env
44
if [ "$STEP" = "tests" ]; then
55
py.test --version
66
export PYTHONPATH=.
7-
python setup.py develop
7+
pip install -e .
88
py.test --cov=bmemcached
99
exit 0
1010
fi

.github/workflows/tests-and-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
max-parallel: 4
1414
matrix:
15-
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
15+
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
1616

1717
steps:
1818
- uses: actions/checkout@v2

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ def read(filename):
2525
"Development Status :: 4 - Beta",
2626
"License :: OSI Approved :: MIT License",
2727
"Operating System :: OS Independent",
28-
"Programming Language :: Python :: 2.7",
29-
"Programming Language :: Python :: 3.4",
30-
"Programming Language :: Python :: 3.5",
31-
"Programming Language :: Python :: 3.6",
32-
"Programming Language :: Python :: 3.7",
3328
"Programming Language :: Python :: 3.8",
3429
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
3533
],
3634
install_requires=[
3735
"six",

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
2-
envlist = py27,py34,py35,py36,py37,py38,py39,py310
2+
envlist = py38,py39,py310,py311,py312
33
[testenv]
44
deps = -rrequirements_test.txt
5-
commands = python setup.py develop
5+
commands = pip install -e .
66
py.test -s
77
flake8

0 commit comments

Comments
 (0)