Skip to content

Commit ad7fbdd

Browse files
Merge pull request #409 from oscarbenjamin/pr_bump_flint36
Bump to FLINT 3.6
2 parents 08d4734 + 95f9a67 commit ad7fbdd

8 files changed

Lines changed: 85 additions & 10 deletions

File tree

‎.github/workflows/buildwheel.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ jobs:
302302
'v3.2.2',
303303
'v3.3.1',
304304
'v3.4.0',
305+
'v3.5.0',
305306
]
306307
steps:
307308
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

‎README.md‎

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Compatible versions:
144144

145145
| python-flint | Release date | CPython | FLINT | Cython |
146146
|--------------|---------------|-------------|------------|------------------|
147-
| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.5` | `3.1-3.2?` |
147+
| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.6` | `3.1-3.2?` |
148148
| `0.8.0` | 29th Aug 2025 | `3.11-3.14` | `3.0-3.3` | `3.1` only |
149149
| `0.7.0` | 16th Mar 2025 | `3.11-3.13` | `3.0-3.2` | `3.0.11-3.1.0a1` |
150150
| `0.6.0` | 1st Feb 2024 | `3.9-3.12` | `3.0` only | `3.0` only |
@@ -197,10 +197,41 @@ Changes (0.9.0):
197197
work. (OB)
198198
- [gh-324](https://github.com/flintlib/python-flint/pull/324),
199199
Faster conversion from `int` to `fmpz` and back. (RO).
200+
- [gh-326](https://github.com/flintlib/python-flint/pull/326),
201+
Add support for building with the Python stable ABI. (OB)
202+
- [gh-341](https://github.com/flintlib/python-flint/pull/341),
203+
Disable hashing for inexact `arb` values. (DSM)
204+
- [gh-347](https://github.com/flintlib/python-flint/pull/347),
205+
Fix storing the variable name for `fq_default`. (OB)
206+
- [gh-350](https://github.com/flintlib/python-flint/pull/350),
207+
Add support for Cython 3.2. (OB)
208+
- [gh-352](https://github.com/flintlib/python-flint/pull/352),
209+
Fix a crash in `fmpz_mat.lll()` for empty matrices. (OB)
200210
- [gh-359](https://github.com/flintlib/python-flint/pull/359),
201211
Sort factorisations of all mpoly types. (OB)
202-
- [gh-374](https://github.com/flintlib/python-flint/pull/374), Fixed a bug in `nmod.__hash__`. (FH)
203-
- [gh-392](https://github.com/flintlib/python-flint/pull/392), Add interface to `acb_theta_jet` (JH, SS)
212+
- [gh-367](https://github.com/flintlib/python-flint/pull/367),
213+
Add type stubs and tests for many more classes. (OB)
214+
- [gh-370](https://github.com/flintlib/python-flint/pull/370),
215+
Fix `unused_gens()` for the zero polynomial. (OB)
216+
- [gh-374](https://github.com/flintlib/python-flint/pull/374),
217+
Fixed a bug in `nmod.__hash__`. (FH)
218+
- [gh-378](https://github.com/flintlib/python-flint/pull/378),
219+
Build Windows extension modules with MSVC. (OB)
220+
- [gh-379](https://github.com/flintlib/python-flint/pull/379),
221+
Add Windows ARM64 wheels. (OB)
222+
- [gh-380](https://github.com/flintlib/python-flint/pull/380),
223+
Support building against FLINT 3.4.0. (OB)
224+
- [gh-393](https://github.com/flintlib/python-flint/pull/393),
225+
Use `fmpz_mod_mat_det()` when building against FLINT 3.1 or newer. (OB)
226+
- [gh-401](https://github.com/flintlib/python-flint/pull/401),
227+
Upload Pyodide wheels to PyPI. (OB)
228+
- [gh-389](https://github.com/flintlib/python-flint/pull/389),
229+
[gh-402](https://github.com/flintlib/python-flint/pull/402),
230+
Support building against FLINT 3.5.0. (OB)
231+
- [gh-392](https://github.com/flintlib/python-flint/pull/392),
232+
Add interface to `acb_theta_jet` (JH, SS)
233+
- [gh-409](https://github.com/flintlib/python-flint/pull/409),
234+
Support building against FLINT 3.6.0. (OB)
204235

205236
0.8.0
206237
-----

‎bin/build_variables.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ MPIRVER=3.0.0 # MPIR build no longer works (not clear where to download from)
1919
# These are the actual dependencies used (at least by default):
2020
GMPVER=6.3.0
2121
MPFRVER=4.2.2
22-
FLINTVER=3.5.0
22+
FLINTVER=3.6.0
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff --git a/Makefile.in b/Makefile.in
2+
index 8185fa609..a3822f53b 100644
3+
--- a/Makefile.in
4+
+++ b/Makefile.in
5+
@@ -424,22 +424,16 @@ endif
6+
7+
ifneq ($(SHARED), 0)
8+
shared: $(FLINT_DIR)/$(FLINT_LIB_FULL)
9+
-# The following is to avoid reaching the maximum length of command line
10+
-# arguments, mainly present on MinGW.
11+
-define xxx_merged_lobj_rule
12+
-$(BUILD_DIR)/$(1)_merged.lo: $($(1)_LOBJS) | $(BUILD_DIR)
13+
- @$(LD) -r $($(1)_LOBJS) -o $(BUILD_DIR)/$(1)_merged.lo
14+
-endef
15+
-$(foreach dir, $(DIRS), $(eval $(call xxx_merged_lobj_rule,$(dir))))
16+
-MERGED_LOBJS:=$(foreach dir, $(DIRS),$(BUILD_DIR)/$(dir)_merged.lo)
17+
ifeq ($(WANT_LTO),1)
18+
SHARED_LIB_DEPS:=$(LOBJS)
19+
else
20+
-SHARED_LIB_DEPS:=$(MERGED_LOBJS)
21+
+SHARED_LINK_RSP := $(BUILD_DIR)/libflint-shared.rsp
22+
+SHARED_LIB_DEPS:=$(LOBJS)
23+
endif
24+
-$(FLINT_DIR)/$(FLINT_LIB_FULL): $(SHARED_LIB_DEPS)
25+
+$(FLINT_DIR)/$(FLINT_LIB_FULL): $(SHARED_LIB_DEPS) | $(BUILD_DIR)
26+
@echo "Building $(FLINT_LIB_FULL)"
27+
- $(CMD) $(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) $(SHARED_LIB_DEPS) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS)
28+
+ @: $(file >$(SHARED_LINK_RSP))$(foreach obj,$(LOBJS),$(file >>$(SHARED_LINK_RSP),$(obj)))
29+
+ $(CMD) $(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) @$(SHARED_LINK_RSP) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS)
30+
@$(RM_F) $(FLINT_LIB)
31+
@$(RM_F) $(FLINT_LIB_MAJOR)
32+
@$(LN_S) $(FLINT_LIB_FULL) $(FLINT_LIB)

‎doc/source/build.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Compatible versions:
8787
* - 0.9.0
8888
- Not yet
8989
- 3.11-3.14
90-
- 3.0-3.5
90+
- 3.0-3.6
9191
- 3.1-3.2?
9292
* - 0.8.0
9393
- 29th Aug 2025

‎meson.build‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ project(
1616
# then we can consider not using a speculative upper version cap here.
1717
#
1818
flint_lower = '>=3.0'
19-
flint_upper = '<3.6'
19+
flint_upper = '<3.7'
2020
cython_lower = '>=3.0.11'
2121
cython_upper = '<3.3'
2222

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from flint.flintlib.types.flint cimport slong
22
from flint.flintlib.types.fmpz_mod cimport fmpz_mod_mpoly_ctx_t, fmpz_mod_mpoly_t
3-
from flint.flintlib.types.gr cimport gr_ctx_t
3+
from flint.flintlib.types.gr cimport gr_ctx_t, gr_ptr, gr_srcptr, gr_vec_t
44

55

66
cdef extern from *:
@@ -30,8 +30,19 @@ cdef extern from *:
3030
3131
#define compat_fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(...) fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(__VA_ARGS__)
3232
33+
#endif
34+
35+
#if __FLINT_RELEASE >= 30600 /* Flint 3.6.0 or later */
36+
37+
#define compat_gr_factor(c, factors, exponents, x, flags, ctx) gr_factor(c, factors, (fmpz_vec_struct *) exponents, x, flags, ctx)
38+
39+
#else
40+
41+
#define compat_gr_factor(c, factors, exponents, x, flags, ctx) gr_factor(c, factors, exponents, x, flags, ctx)
42+
3343
#endif
3444
"""
3545
void compat_gr_ctx_init_gr_series(gr_ctx_t ctx, gr_ctx_t base_ring, slong prec)
3646
void compat_gr_ctx_init_series_mod_gr_poly(gr_ctx_t ctx, gr_ctx_t base_ring, slong n)
3747
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)
48+
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/types/_gr.pxd‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ from flint.flintlib.functions.fmpq_poly cimport (
3333
fmpq_poly_set,
3434
)
3535
from flint.flintlib.functions.compat cimport (
36+
compat_gr_factor,
3637
compat_gr_ctx_init_gr_series,
3738
# compat_gr_ctx_init_series_mod_gr_poly,
3839
)
@@ -159,7 +160,6 @@ from flint.flintlib.functions.gr cimport (
159160

160161
gr_gcd,
161162
gr_lcm,
162-
gr_factor,
163163

164164
gr_floor,
165165
gr_ceil,
@@ -782,7 +782,7 @@ cdef class gr_ctx(flint_ctx):
782782
c = self.new_gr()
783783
gr_vec_init(factors, 0, self.ctx_t)
784784
gr_vec_init(exponents, 0, gr_fmpz_ctx_c.ctx_t)
785-
err = gr_factor(c.pval, factors, exponents, x.pval, flags, self.ctx_t)
785+
err = compat_gr_factor(c.pval, factors, exponents, x.pval, flags, self.ctx_t)
786786
if err != GR_SUCCESS:
787787
raise self._error(err, "Failed to factor gr object")
788788
length = gr_vec_length(factors, self.ctx_t)
@@ -1716,7 +1716,7 @@ cdef class gr(flint_scalar):
17161716
c = self.ctx.new_gr()
17171717
gr_vec_init(factors, 0, self.ctx.ctx_t)
17181718
gr_vec_init(exponents, 0, gr_fmpz_ctx_c.ctx_t)
1719-
err = gr_factor(c.pval, factors, exponents, self.pval, flags, self.ctx.ctx_t)
1719+
err = compat_gr_factor(c.pval, factors, exponents, self.pval, flags, self.ctx.ctx_t)
17201720
if err != GR_SUCCESS:
17211721
raise self._error(err, "Failed to factor gr object")
17221722
length = gr_vec_length(factors, self.ctx.ctx_t)

0 commit comments

Comments
 (0)