Skip to content

Commit cac9130

Browse files
Copilotwhtsky
andcommitted
Drop support for EOL Python versions, test all alive versions (3.10-3.13)
- Remove EOL Python 3.6-3.9 from classifiers and cibuildwheel - Add Python 3.12, 3.13 to classifiers - Add python_requires='>=3.10' to setup.py - Update Cython requirement to >=3.0 for Python 3.12+ support - Add test matrix for Python 3.10, 3.11, 3.12, 3.13 - Update cibuildwheel to v2.22, upload-artifact to v4, codecov to v4 - Update CI OS runners to latest versions - Add workflow permissions for security Co-authored-by: whtsky <876694+whtsky@users.noreply.github.com>
1 parent 802a784 commit cac9130

5 files changed

Lines changed: 26 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ name: Build
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build_wheels:
710
name: Build wheels on ${{ matrix.os }}
811
runs-on: ${{ matrix.os }}
912
strategy:
1013
matrix:
11-
os: [ubuntu-20.04, windows-2019, macos-11]
14+
os: [ubuntu-latest, windows-latest, macos-latest]
1215

1316
steps:
1417
- uses: actions/checkout@v4
@@ -20,11 +23,12 @@ jobs:
2023
platforms: all
2124

2225
- name: Build wheels
23-
uses: pypa/cibuildwheel@v2.16.2
26+
uses: pypa/cibuildwheel@v2.22
2427
env:
2528
CIBW_ARCHS: all
26-
- uses: actions/upload-artifact@v3
29+
- uses: actions/upload-artifact@v4
2730
with:
31+
name: wheels-${{ matrix.os }}
2832
path: ./wheelhouse/*.whl
2933

3034
make_sdist:
@@ -34,6 +38,7 @@ jobs:
3438
- uses: actions/checkout@v4
3539
- name: Build SDist
3640
run: pipx run build --sdist
37-
- uses: actions/upload-artifact@v3
41+
- uses: actions/upload-artifact@v4
3842
with:
43+
name: sdist
3944
path: dist/*.tar.gz

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@ on:
22
push:
33
pull_request:
44
name: Test
5+
permissions:
6+
contents: read
57
jobs:
68
pytest:
7-
name: pytest
9+
name: pytest (${{ matrix.python-version }})
810
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11", "3.12", "3.13"]
914
steps:
10-
- uses: actions/checkout@master
15+
- uses: actions/checkout@v4
1116
- uses: actions/setup-python@v5
1217
with:
13-
python-version: "3.10"
18+
python-version: ${{ matrix.python-version }}
1419
architecture: "x64"
1520
- run: python -m pip install -U pip wheel setuptools
1621
- run: python -m pip install -r test-requirements.txt
@@ -19,4 +24,4 @@ jobs:
1924
CFLAGS: "-DCYTHON_TRACE=1"
2025
BENCODER_LINETRACE: 1
2126
- run: python -m pytest --cov=bencoder --cov-report=xml .
22-
- uses: codecov/codecov-action@v3.1.4
27+
- uses: codecov/codecov-action@v4

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[build-system]
2-
requires = ["cython>=0.29.32", "setuptools>=58.0", "wheel"]
2+
requires = ["cython>=3.0", "setuptools>=58.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.cibuildwheel]
6+
skip = "cp36-* cp37-* cp38-* cp39-* pp37-* pp38-* pp39-*"
67
test-requires = "pytest"
78
test-command = "pytest {project}/tests"

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,18 @@ def run_tests(self):
7676
'Programming Language :: Cython',
7777
'Programming Language :: Python',
7878
'Programming Language :: Python :: 3',
79-
'Programming Language :: Python :: 3.6',
80-
'Programming Language :: Python :: 3.7',
81-
'Programming Language :: Python :: 3.8',
82-
'Programming Language :: Python :: 3.9',
8379
'Programming Language :: Python :: 3.10',
8480
'Programming Language :: Python :: 3.11',
81+
'Programming Language :: Python :: 3.12',
82+
'Programming Language :: Python :: 3.13',
8583
'Programming Language :: Python :: Implementation :: CPython',
8684
'Programming Language :: Python :: Implementation :: PyPy',
8785
'Intended Audience :: Developers',
8886
'Topic :: Software Development :: Libraries',
8987
'Topic :: Software Development :: Libraries :: Python Modules',
9088
'Topic :: Utilities',
9189
],
90+
python_requires='>=3.10',
9291
ext_modules=ext_modules,
9392
install_requires=[],
9493
tests_require=['cython', 'pytest', 'coverage'],

test-requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Cython==0.29.32
2-
pytest==7.2.0
3-
pytest-cov==4.0.0
1+
Cython>=3.0
2+
pytest>=7.2.0
3+
pytest-cov>=4.0.0

0 commit comments

Comments
 (0)