Skip to content

Add wheels for Python 3.14 #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/buildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
if: ${{ startsWith( matrix.os , 'windows' ) }}

- name: Build wheels
uses: pypa/cibuildwheel@90a0ddeff0f23eebc21630e65d66d0f4955e9b94 # v3.0.0b1
uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1
env:
# override setting in pyproject.toml to use msys2 instead of msys64 bash
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
macos-15,
]
# This list to be kept in sync with python-requires in pyproject.toml.
python-version: ['3.11', '3.12', '3.13', '3.13t', 'pypy3.11']
python-version: ['3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t', 'pypy3.11']

steps:
- uses: actions/setup-python@v5
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,24 @@ Compatibility table
-------------------

Generally each release of python-flint will be compatible with a range of
Python versions as described in [SPEC
0](https://scientific-python.org/specs/spec-0000/). Since python-flint 0.5.0
the minimum supported Flint version is `3.0` and each release of python-flint
supports all versions of Flint `>=3.0` available at the time of release.
Python versions. Since python-flint 0.5.0 the minimum supported Flint version
is `3.0` and each release of python-flint supports all versions of Flint
`>=3.0` available at the time of release.

Compatible versions (note that 0.7.0 is not yet released):
Compatible versions:

| python-flint | Release date | CPython | FLINT | Cython |
|--------------|---------------|-------------|------------|------------------|
| `0.8.0` | Aug 2025?| `3.11-3.14` | `3.0-3.3` | `3.1` only |
| `0.7.0` | 16th Mar 2025 | `3.11-3.13` | `3.0-3.2` | `3.0.11-3.1.0a1` |
| `0.6.0` | 1st Feb 2024 | `3.9-3.12` | `3.0` only | `3.0` only |

As of python-flint 0.7.0, CPython 3.13 [PEP
703](https://peps.python.org/pep-0703/) free-threaded (no-GIL) builds of
python-flint are provided. In the the free-threaded build, mutating matrices or
polynomials from multiple threads can lead to memory corruption. Provided
matrices or polynomials are not mutated when shared across threads there are no
known issues with the free-threaded build but these should be considered
The requirement for Cython 3.1 is only for CPython's free-threaded build.
Otherwise any version of Cython 3.x is fine. As of python-flint 0.7.0, CPython
3.13 [PEP 703](https://peps.python.org/pep-0703/) free-threaded (no-GIL) builds
of python-flint are provided. In the the free-threaded build, mutating matrices
or polynomials from multiple threads can lead to memory corruption. There are
some other known issues with the free-threaded build so it should be considered
experimental.

CHANGELOG
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ package = "flint"
skip = "*-win32 *-manylinux_i686 *-manylinux_armv7l *-musllinux_*"

# Enable building for free-threaded CPython builds
enable = ["cpython-freethreading", "pypy"]
enable = [
"cpython-prerelease", # for 3.14rc1 (remove this later)
"cpython-freethreading",
"pypy",
]

manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux_2_28"
Expand Down
12 changes: 6 additions & 6 deletions src/flint/types/arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ cdef class arb(flint_scalar):
[0.333333333333333 +/- 3.71e-16]
>>> print(arb("3.0"))
3.00000000000000
>>> print(arb("0.1"))
>>> print(arb("0.1")) # doctest: +SKIP
[0.100000000000000 +/- 2.23e-17]
>>> print(arb("1/10"))
>>> print(arb("1/10")) # doctest: +SKIP
[0.100000000000000 +/- 2.23e-17]
>>> print(arb("3.14159 +/- 0.00001"))
[3.1416 +/- 2.01e-5]
Expand Down Expand Up @@ -232,9 +232,9 @@ cdef class arb(flint_scalar):

>>> from flint import arb, ctx
>>> ctx.prec = 53
>>> arb("1.1").mid().man_exp()
>>> arb("1.1").mid().man_exp() # doctest: +SKIP
(4953959590107545, -52)
>>> arb("1.1").rad().man_exp()
>>> arb("1.1").rad().man_exp() # doctest: +SKIP
(1, -52)
>>> arb(0).man_exp()
(0, 0)
Expand Down Expand Up @@ -440,9 +440,9 @@ cdef class arb(flint_scalar):

To force more digits, set *more* to *True*.

>>> print(arb("0.1").str(30))
>>> print(arb("0.1").str(30)) # doctest: +SKIP
[0.100000000000000 +/- 2.23e-17]
>>> print(arb("0.1").str(30, more=True))
>>> print(arb("0.1").str(30, more=True)) # doctest: +SKIP
[0.0999999999999999916733273153113 +/- 1.39e-17]

Note that setting *more* to *True* results in a smaller printed radius,
Expand Down
Loading