Skip to content

Commit c12484b

Browse files
committed
Drop Python 3.9 and add 3.13 free-threaded CI job
1 parent 920a3a2 commit c12484b

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

.github/workflows/buildwheel.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ jobs:
107107
fail-fast: false
108108
matrix:
109109
os: [ubuntu-20.04, windows-2019, macos-13, macos-14]
110-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13-dev']
110+
# This list to be kept in sync with cibuildwheel config
111+
# and python-requires in pyproject.toml.
112+
python-version: ['3.10', '3.11', '3.12', '3.13-dev']
111113

112114
steps:
113115
- uses: actions/setup-python@v5
@@ -209,6 +211,37 @@ jobs:
209211
- run: pip install -r requirements-dev.txt
210212
- run: bin/coverage.sh
211213

214+
# On new enough Ubuntu we can build against the system deb.
215+
test_freethreaded:
216+
name: Free-threaded ${{ matrix.python-version }} on ${{ matrix.os }}
217+
runs-on: ${{ matrix.os }}
218+
strategy:
219+
fail-fast: false
220+
matrix:
221+
os: [ubuntu-24.04]
222+
python-version: ['3.13-dev']
223+
steps:
224+
- uses: actions/checkout@v4
225+
# Can't use actions/setup-python
226+
# https://github.com/actions/setup-python/issues/771
227+
# deadsnakes only works for Ubuntu...
228+
- uses: deadsnakes/[email protected]
229+
with:
230+
python-version: ${{ matrix.python-version }}
231+
nogil: true
232+
- run: |
233+
python --version --version
234+
which python
235+
python -c "import sysconfig; print(sysconfig.get_config_var('Py_GIL_DISABLED'))"
236+
python -c "import sys; print(sys._is_gil_enabled())"
237+
- run: sudo apt-get update
238+
- run: sudo apt-get install libflint-dev
239+
# Need Cython master until 3.1 is released
240+
- run: pip install git+https://github.com/cython/cython.git@master
241+
- run: pip install -r requirements-dev.txt
242+
- run: pip install --no-build-isolation .
243+
- run: python -m flint.test --verbose
244+
212245
# Run SymPy test suite against python-flint master
213246
test_sympy:
214247
name: Test SymPy ${{ matrix.sympy-version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Author: Fredrik Johansson <[email protected]>
1818
Installation
1919
------------
2020

21-
Currently python-flint supports CPython versions 3.9-3.12. For Windows (x86-64)
21+
Currently python-flint supports CPython versions 3.10-3.13. For Windows (x86-64)
2222
or OSX (x86-64 or arm64) or Linux (x86-64 `manylinux_2_17`) there are CPython
2323
binary wheels for python-flint on PyPI. For these platforms python-flint can be
2424
installed simply with `pip`

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
name = "python-flint"
33
description = "Bindings for FLINT"
44
version = "0.7.0a4"
5-
requires-python = ">= 3.9"
5+
# This needs to be in sync with README, cibuildwheel and CI config.
6+
requires-python = ">= 3.10"
67
urls = {Homepage = "https://github.com/flintlib/python-flint"}
78
authors = [
89
{name = "Fredrik Johansson", email = "[email protected]"},
@@ -57,8 +58,13 @@ package = "flint"
5758
[tool.cibuildwheel]
5859
# requires-python needs to keep in sync with this and also the list of Python
5960
# versions the wheels are tested against in CI.
60-
build = "cp39-* cp310-* cp311-* cp312-* cp313-*"
61+
build = "cp310-* cp311-* cp312-* cp313-*"
6162
skip = "*-win32 *-manylinux_i686 *-musllinux_*"
63+
64+
# This is needed for free-threaded wheels:
65+
# build = "cp313t-*"
66+
# free-threaded-support = true
67+
6268
manylinux-x86_64-image = "manylinux2014"
6369
manylinux-i686-image = "manylinux2014"
6470
test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\""

0 commit comments

Comments
 (0)