Skip to content

Commit ad9765b

Browse files
jameshilliardtacaswellfafanoulelefantix
authored
Fix build and run tests on Python 3.13 (#107)
--------- Co-authored-by: Thomas A Caswell <[email protected]> Co-authored-by: Fabien Bousquet <[email protected]> Co-authored-by: Fantix King <[email protected]>
1 parent de13727 commit ad9765b

File tree

3 files changed

+27
-28
lines changed

3 files changed

+27
-28
lines changed

.github/workflows/release.yml

+23-24
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,32 @@ jobs:
3737
mkdir -p dist/
3838
echo "${VERSION}" > dist/VERSION
3939
40-
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
40+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
4141
with:
42-
name: dist
42+
name: dist-version
4343
path: dist/
4444

4545
build-sdist:
4646
needs: validate-release-request
4747
runs-on: ubuntu-latest
4848

4949
steps:
50-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
50+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
5151
with:
5252
fetch-depth: 50
5353
submodules: true
5454

5555
- name: Set up Python
56-
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
56+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
5757

5858
- name: Build source distribution
5959
run: |
6060
python -m pip install -U setuptools wheel pip
6161
python setup.py sdist
6262
63-
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
63+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
6464
with:
65-
name: dist
65+
name: dist-sdist
6666
path: dist/*.tar.*
6767

6868
build-wheels:
@@ -73,19 +73,17 @@ jobs:
7373
os: [ubuntu-latest, macos-latest, windows-latest]
7474
cibw_arch: ["auto64", "aarch64", "universal2"]
7575
cibw_python:
76-
- "cp38-*"
77-
- "cp39-*"
78-
- "cp310-*"
79-
- "cp311-*"
80-
- "cp312-*"
76+
- "cp38"
77+
- "cp39"
78+
- "cp310"
79+
- "cp311"
80+
- "cp312"
81+
- "cp313"
8182
exclude:
8283
- os: ubuntu-latest
8384
cibw_arch: universal2
8485
- os: macos-latest
8586
cibw_arch: aarch64
86-
- os: macos-latest
87-
cibw_python: "cp37-*"
88-
cibw_arch: universal2
8987
- os: windows-latest
9088
cibw_arch: universal2
9189
- os: windows-latest
@@ -99,45 +97,46 @@ jobs:
9997
PIP_DISABLE_PIP_VERSION_CHECK: 1
10098

10199
steps:
102-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
100+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
103101
with:
104102
fetch-depth: 50
105103
submodules: true
106104

107105
- name: Set up QEMU
108106
if: matrix.os == 'ubuntu-latest' && matrix.cibw_arch == 'aarch64'
109-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
107+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
110108
with:
111109
platforms: arm64
112110

113-
- uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # v2.16.2
111+
- uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
114112
env:
115113
CIBW_BUILD_VERBOSITY: 1
116-
CIBW_BUILD: ${{ matrix.cibw_python }}
114+
CIBW_BUILD: ${{ matrix.cibw_python }}-*
117115
CIBW_ARCHS: ${{ matrix.cibw_arch }}
118116
CIBW_TEST_EXTRAS: "test"
119117
CIBW_TEST_COMMAND: "python {project}/tests/__init__.py"
120118
CIBW_TEST_COMMAND_WINDOWS: "python {project}\\tests\\__init__.py"
121119
CIBW_TEST_SKIP: "*universal2:arm64"
122120

123-
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
121+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
124122
with:
125-
name: dist
123+
name: dist-${{ matrix.os }}-${{ matrix.cibw_arch }}-${{ matrix.cibw_python }}
126124
path: wheelhouse/*.whl
127125

128126
publish:
129127
needs: [build-sdist, build-wheels]
130128
runs-on: ubuntu-latest
131129

132130
steps:
133-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
131+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
134132
with:
135133
fetch-depth: 5
136134
submodules: false
137135

138-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
136+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
139137
with:
140-
name: dist
138+
pattern: dist-*
139+
merge-multiple: true
141140
path: dist/
142141

143142
- name: Extract Release Version
@@ -171,7 +170,7 @@ jobs:
171170
ls -al dist/
172171
173172
- name: Upload to PyPI
174-
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10
173+
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3
175174
with:
176175
user: __token__
177176
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1818
os: [windows-latest, ubuntu-latest, macos-latest]
1919

2020
env:
2121
PIP_DISABLE_PIP_VERSION_CHECK: 1
2222

2323
steps:
24-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
24+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2525
with:
2626
fetch-depth: 50
2727
submodules: true
@@ -37,7 +37,7 @@ jobs:
3737
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
3838
3939
- name: Set up Python ${{ matrix.python-version }}
40-
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
40+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
4141
if: steps.release.outputs.version == 0
4242
with:
4343
python-version: ${{ matrix.python-version }}

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
ROOT = pathlib.Path(__file__).parent
1717

18-
CYTHON_DEPENDENCY = 'Cython(>=0.29.24,<0.30.0)'
18+
CYTHON_DEPENDENCY = 'Cython>=0.29.24'
1919

2020

2121
class httptools_build_ext(build_ext):

0 commit comments

Comments
 (0)