Skip to content

Commit 3d3380a

Browse files
committed
Make FLINT 3.4 the minimum supported version
(Drop 3.0-3.3)
1 parent 6708168 commit 3d3380a

19 files changed

Lines changed: 105 additions & 449 deletions

‎.github/workflows/buildwheel.yml‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ jobs:
300300
strategy:
301301
fail-fast: false
302302
matrix:
303-
os: [ubuntu-24.04]
303+
os: [ubuntu-26.04]
304304
steps:
305305
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
306306
with:
@@ -332,7 +332,7 @@ jobs:
332332
# Test build with minimum Cython and meson-python versions.
333333
test_old_build_requires:
334334
name: 'Test old Cython/meson-python'
335-
runs-on: ubuntu-24.04
335+
runs-on: ubuntu-26.04
336336
steps:
337337
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
338338
with:
@@ -353,7 +353,7 @@ jobs:
353353
- run: pip install --no-build-isolation .
354354
- run: python -m flint.test --verbose
355355

356-
# For older Ubuntu we have to build Flint >= 3.0.0
356+
# Build and test against each supported FLINT release.
357357
test_flint_releases:
358358
name: Test flint ${{ matrix.flint-tag }}
359359
runs-on: ubuntu-22.04
@@ -362,11 +362,9 @@ jobs:
362362
matrix:
363363
# Supported Flint versions:
364364
flint-tag: [
365-
'v3.0.1',
366-
'v3.2.2',
367-
'v3.3.1',
368365
'v3.4.0',
369366
'v3.5.0',
367+
'v3.6.0',
370368
]
371369
steps:
372370
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -416,7 +414,7 @@ jobs:
416414
# Test that we can make a coverage build and report coverage
417415
test_coverage_build_setuptools:
418416
name: Test coverage setuptools build
419-
runs-on: ubuntu-24.04
417+
runs-on: ubuntu-26.04
420418
steps:
421419
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
422420
with:
@@ -432,7 +430,7 @@ jobs:
432430
# Test that we can make a coverage build and report coverage
433431
test_coverage_build_meson:
434432
name: Test coverage meson build
435-
runs-on: ubuntu-24.04
433+
runs-on: ubuntu-26.04
436434
steps:
437435
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
438436
with:
@@ -448,7 +446,7 @@ jobs:
448446
# Run SymPy test suite against python-flint master
449447
test_sympy:
450448
name: Test SymPy ${{ matrix.sympy-version }}
451-
runs-on: ubuntu-24.04
449+
runs-on: ubuntu-26.04
452450
strategy:
453451
fail-fast: false
454452
matrix:
@@ -472,7 +470,7 @@ jobs:
472470
# Run SymPy master branch agains python-flint main
473471
test_sympy_master:
474472
name: Test SymPy master
475-
runs-on: ubuntu-24.04
473+
runs-on: ubuntu-26.04
476474
steps:
477475
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
478476
with:

‎README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ Build from source
3737
-----------------
3838

3939
For other platforms or architectures installation needs to build from source.
40-
First install FLINT 3. Starting with python-flint 0.5.0 older versions of Flint
41-
such as 2.9 are not supported any more. Note that as of Flint 3 Arb no longer
42-
needs to be built separately as it is now merged into Flint.
40+
First install FLINT 3.4 or newer. Note that as of Flint 3 Arb no longer needs
41+
to be built separately as it is now merged into Flint.
4342

44-
As of e.g. Ubuntu 24.04 a new enough version of FLINT (at least version 3) can
43+
As of e.g. Ubuntu 26.04 a new enough version of FLINT (at least version 3.4) can
4544
be installed from the Ubuntu repos like
4645

4746
sudo apt-get install libflint-dev
@@ -136,15 +135,14 @@ Compatibility table
136135
-------------------
137136

138137
Generally each release of python-flint will be compatible with a range of
139-
Python versions. Since python-flint 0.5.0 the minimum supported Flint version
140-
is `3.0` and each release of python-flint supports all versions of Flint
141-
`>=3.0` available at the time of release.
138+
Python and FLINT versions. The supported range for each release is shown
139+
below.
142140

143141
Compatible versions:
144142

145143
| python-flint | Release date | CPython | FLINT | Cython |
146144
|--------------|---------------|-------------|------------|------------------|
147-
| `0.10.0` | Not released | `3.10-3.15` | `3.0-3.6` | `3.1-3.3` |
145+
| `0.10.0` | Not released | `3.10-3.15` | `3.4-3.6` | `3.1-3.3` |
148146
| `0.9.0` | 3rd Jul 2026 | `3.10-3.14` | `3.0-3.6` | `3.1-3.2` |
149147
| `0.8.0` | 29th Aug 2025 | `3.11-3.14` | `3.0-3.3` | `3.1` only |
150148
| `0.7.0` | 16th Mar 2025 | `3.11-3.13` | `3.0-3.2` | `3.0.11-3.1.0a1` |
@@ -174,6 +172,9 @@ Contributors (0.10.0):
174172

175173
Changes (0.10.0):
176174

175+
- Drop support for FLINT versions older than 3.4.0 and remove the associated
176+
compatibility code. (OB)
177+
177178
- [gh-421](https://github.com/flintlib/python-flint/pull/421),
178179
Add `zpoly` and `zcontent` methods to `fmpq_mpoly`, to get
179180
the primitive integer polynomial and the `fmpq` content, which

‎bin/patch-flint-windows-arm64-link-3.3.1.diff‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎bin/pyodide_build_dependencies.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ do
2727
shift
2828
;;
2929
--flint-commit)
30-
# e.g. --flint-commit 3.3.1
30+
# e.g. --flint-commit 3.4.0
3131
FLINT_COMMIT="$2"
3232
shift
3333
shift

‎doc/source/_gr.rst‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ variables over the Gaussian integers :math:`\mathbb{Z}[i][x,y]` we would do::
2020
>>> ctx.gens()
2121
[x, y]
2222

23-
# XXX: gens_recursive not available in FLINT < 3.1
2423
# >>> ctx.gens_recursive()
2524
# [I, x, y]
2625
# >>> I, x, y = ctx.gens_recursive()

‎doc/source/build.rst‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ Simple build instructions
1616
The simple explanation of how to build ``python-flint`` from source is that
1717
there are two steps:
1818

19-
- Install ``FLINT >= 3.0`` (see :ref:`installing_the_dependencies` below).
19+
- Install ``FLINT >= 3.4`` (see :ref:`installing_the_dependencies` below).
2020
- Run ``pip install --no-binary python-flint python-flint``.
2121

22-
For example on Ubuntu 24.04 (but not older versions of Ubuntu) and when installing
23-
``python-flint >= 0.7.0`` these two steps are::
22+
For example on Ubuntu 26.04 (but not older versions of Ubuntu) these two steps
23+
are::
2424

2525
sudo apt-get install libflint-dev
2626
pip install --no-binary python-flint python-flint
2727

28-
The first command installs ``FLINT 3.0.1`` system-wide. With the second command
28+
The first command installs ``FLINT 3.4.0`` system-wide. With the second command
2929
``pip`` will download the source code for the latest release of
3030
``python-flint`` from PyPI, build it and install it into the active Python
3131
environment. When building, ``pip`` will create a temporary isolated build
@@ -70,9 +70,8 @@ Compatibility and supported versions
7070

7171
Generally each release of python-flint will be compatible with a range of
7272
Python versions as described in `SPEC 0
73-
<https://scientific-python.org/specs/spec-0000/>`_. Since python-flint 0.5.0
74-
the minimum supported FLINT version is ``3.0`` and each release of python-flint
75-
supports all versions of ``FLINT >= 3.0`` available at the time of release.
73+
<https://scientific-python.org/specs/spec-0000/>`_ and a range of FLINT
74+
versions. The supported range for each release is shown below.
7675

7776
Compatible versions:
7877

@@ -87,7 +86,7 @@ Compatible versions:
8786
* - 0.10.0
8887
- Not released
8988
- 3.10-3.15
90-
- 3.0-3.6
89+
- 3.4-3.6
9190
- 3.1-3.3
9291
* - 0.9.0
9392
- 3rd Jul 2026
@@ -289,15 +288,15 @@ The dependencies for building ``python-flint`` have changed over time. See
289288
:ref:`supported_versions` above for the versions of the dependencies that are
290289
supported by each version of ``python-flint``.
291290

292-
As of ``python-flint 0.7.0`` the runtime dependencies are Python and FLINT (at
293-
least version 3.0) and the build-time dependencies are a C compiler,
291+
The runtime dependencies are Python and FLINT (at least version 3.4) and the
292+
build-time dependencies are a C compiler,
294293
``Cython``, ``meson``, ``meson-python`` and ``ninja``. Commands shown above
295294
such as ``pip install .`` will install dependencies like ``Cython``, ``meson``
296295
etc automatically. If you already have Python and a C compiler then what needs
297296
to be installed before building ``python-flint`` is ``FLINT``.
298297

299-
At the time of writing, few Linux distributions provide ``FLINT >= 3.0`` in
300-
their package repositories but for example on ``Ubuntu 24.04`` (but not any
298+
At the time of writing, few Linux distributions provide ``FLINT >= 3.4`` in
299+
their package repositories but for example on ``Ubuntu 26.04`` (but not any
301300
earlier Ubuntu versions) you can install a sufficiently recent ``FLINT`` with::
302301

303302
sudo apt-get install libflint-dev
@@ -307,7 +306,7 @@ On MacOS you can install FLINT from homebrew with::
307306
brew install flint
308307

309308
Other package managers may also provide ``FLINT`` but make sure that it is at
310-
least version ``3.0``.
309+
least version ``3.4``.
311310

312311
Once ``FLINT`` is installed it should be possible to build ``python-flint``
313312
with any of the commands shown above e.g.::
@@ -326,7 +325,7 @@ that uses ``apt-get`` to install all dependencies needed to build ``FLINT``,
326325
then builds ``FLINT`` from git using a specified git ref, and then installs
327326
``FLINT`` system-wide::
328327

329-
bin/install_flint_ubuntu.sh v3.0.1 # version 3.0.1
328+
bin/install_flint_ubuntu.sh v3.4.0 # version 3.4.0
330329
bin/install_flint_ubuntu.sh main # latest git
331330

332331
The script can be adapted for other Linux distributions or MacOS to use

‎meson.build‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ project(
1515
# if it seems like new releases do not always break the build of python-flint
1616
# then we can consider not using a speculative upper version cap here.
1717
#
18-
flint_lower = '>=3.0'
18+
flint_lower = '>=3.4'
1919
flint_upper = '<3.7'
2020
cython_lower = '>=3.0.11'
2121
cython_upper = '<3.4'
@@ -70,11 +70,6 @@ if get_option('flint_version_check')
7070
endif
7171
endif
7272

73-
# flint.pc was missing -lflint until Flint 3.1.0
74-
if flint_dep.version().version_compare('<3.1')
75-
flint_dep = cc.find_library('flint')
76-
endif
77-
7873
pyflint_deps = [gmp_dep, mpfr_dep, flint_dep]
7974

8075
add_project_arguments(

‎src/flint/flintlib/functions/acb_theta.pxd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cdef extern from "flint/acb_theta.h":
5454
int acb_theta_char_is_even(ulong ab, slong g)
5555
void acb_theta_char_table(ulong * ch, slong * e, const fmpz_mat_t mat, ulong ab, int all)
5656
void acb_theta_char_shuffle(acb_ptr res, const fmpz_mat_t mat, acb_srcptr th, int sqr, slong prec)
57-
slong acb_theta_jet_nb(slong ord, slong g)
57+
slong acb_theta_jet_nb(slong g, slong ord)
5858
slong acb_theta_jet_total_order(const slong * tup, slong g)
5959
void acb_theta_jet_tuples(slong * tups, slong ord, slong g)
6060
slong acb_theta_jet_index(const slong * tup, slong g)
Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,9 @@
1-
from flint.flintlib.types.flint cimport slong
2-
from flint.flintlib.types.fmpz_mod cimport fmpz_mod_mpoly_ctx_t, fmpz_mod_mpoly_t
31
from flint.flintlib.types.gr cimport gr_ctx_t, gr_ptr, gr_srcptr, gr_vec_t
42

53

64
cdef extern from *:
75
"""
86
#include "flint/gr.h"
9-
#if __FLINT_RELEASE >= 30400 /* Flint 3.4.0 or later */
10-
#include "flint/gr_series.h"
11-
#endif
12-
13-
#if __FLINT_RELEASE >= 30400 /* Flint 3.4.0 or later */
14-
15-
#define compat_gr_ctx_init_gr_series(...) gr_series_ctx_init(__VA_ARGS__)
16-
#define compat_gr_ctx_init_series_mod_gr_poly(...) gr_series_mod_ctx_init(__VA_ARGS__)
17-
18-
#else
19-
20-
#define compat_gr_ctx_init_gr_series(...) gr_ctx_init_gr_series(__VA_ARGS__)
21-
#define compat_gr_ctx_init_series_mod_gr_poly(...) gr_ctx_init_series_mod_gr_poly(__VA_ARGS__)
22-
23-
#endif
24-
25-
#if __FLINT_RELEASE < 30200 /* Flint < 3.2.0 */
26-
27-
#define compat_fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(...) (void)0
28-
29-
#else
30-
31-
#define compat_fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(...) fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(__VA_ARGS__)
32-
33-
#endif
34-
357
#if __FLINT_RELEASE >= 30600 /* Flint 3.6.0 or later */
368
379
#define compat_gr_factor(c, factors, exponents, x, flags, ctx) gr_factor(c, factors, (fmpz_vec_struct *) exponents, x, flags, ctx)
@@ -42,7 +14,4 @@ cdef extern from *:
4214
4315
#endif
4416
"""
45-
void compat_gr_ctx_init_gr_series(gr_ctx_t ctx, gr_ctx_t base_ring, slong prec)
46-
void compat_gr_ctx_init_series_mod_gr_poly(gr_ctx_t ctx, gr_ctx_t base_ring, slong n)
47-
void compat_fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(fmpz_mod_mpoly_t A, const fmpz_mod_mpoly_t B, const slong * c, const fmpz_mod_mpoly_ctx_t ctxB, const fmpz_mod_mpoly_ctx_t ctxAC)
4817
int compat_gr_factor(gr_ptr c, gr_vec_t factors, gr_vec_t exponents, gr_srcptr x, int flags, gr_ctx_t ctx)

‎src/flint/flintlib/types/flint.pxd‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,6 @@ cdef extern from "flint/fmpz.h":
4343
# Macros
4444
int COEFF_IS_MPZ(fmpz_struct x)
4545

46-
cdef extern from *:
47-
"""
48-
#if __FLINT_RELEASE < 30200 /* Flint < 3.2.0 */
49-
50-
/* Functions renamed in Flint 3.2.0 */
51-
#define flint_rand_init flint_randinit
52-
#define flint_rand_clear flint_randclear
53-
54-
#endif
55-
"""
56-
5746
cdef extern from "flint/flint.h":
5847
# These defines are needed to work around a Cython bug.
5948
# Otherwise sizeof(ulong) will give the wrong size on 64 bit Windows.

0 commit comments

Comments
 (0)