Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/buildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ jobs:
'v3.2.2',
'v3.3.1',
'v3.4.0',
'v3.5.0',
]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Compatible versions:

| python-flint | Release date | CPython | FLINT | Cython |
|--------------|---------------|-------------|------------|------------------|
| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.5` | `3.1-3.2?` |
| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.6` | `3.1-3.2?` |
| `0.8.0` | 29th 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 |
Expand Down Expand Up @@ -197,10 +197,41 @@ Changes (0.9.0):
work. (OB)
- [gh-324](https://github.com/flintlib/python-flint/pull/324),
Faster conversion from `int` to `fmpz` and back. (RO).
- [gh-326](https://github.com/flintlib/python-flint/pull/326),
Add support for building with the Python stable ABI. (OB)
- [gh-341](https://github.com/flintlib/python-flint/pull/341),
Disable hashing for inexact `arb` values. (DSM)
- [gh-347](https://github.com/flintlib/python-flint/pull/347),
Fix storing the variable name for `fq_default`. (OB)
- [gh-350](https://github.com/flintlib/python-flint/pull/350),
Add support for Cython 3.2. (OB)
- [gh-352](https://github.com/flintlib/python-flint/pull/352),
Fix a crash in `fmpz_mat.lll()` for empty matrices. (OB)
- [gh-359](https://github.com/flintlib/python-flint/pull/359),
Sort factorisations of all mpoly types. (OB)
- [gh-374](https://github.com/flintlib/python-flint/pull/374), Fixed a bug in `nmod.__hash__`. (FH)
- [gh-392](https://github.com/flintlib/python-flint/pull/392), Add interface to `acb_theta_jet` (JH, SS)
- [gh-367](https://github.com/flintlib/python-flint/pull/367),
Add type stubs and tests for many more classes. (OB)
- [gh-370](https://github.com/flintlib/python-flint/pull/370),
Fix `unused_gens()` for the zero polynomial. (OB)
- [gh-374](https://github.com/flintlib/python-flint/pull/374),
Fixed a bug in `nmod.__hash__`. (FH)
- [gh-378](https://github.com/flintlib/python-flint/pull/378),
Build Windows extension modules with MSVC. (OB)
- [gh-379](https://github.com/flintlib/python-flint/pull/379),
Add Windows ARM64 wheels. (OB)
- [gh-380](https://github.com/flintlib/python-flint/pull/380),
Support building against FLINT 3.4.0. (OB)
- [gh-393](https://github.com/flintlib/python-flint/pull/393),
Use `fmpz_mod_mat_det()` when building against FLINT 3.1 or newer. (OB)
- [gh-401](https://github.com/flintlib/python-flint/pull/401),
Upload Pyodide wheels to PyPI. (OB)
- [gh-389](https://github.com/flintlib/python-flint/pull/389),
[gh-402](https://github.com/flintlib/python-flint/pull/402),
Support building against FLINT 3.5.0. (OB)
- [gh-392](https://github.com/flintlib/python-flint/pull/392),
Add interface to `acb_theta_jet` (JH, SS)
- [gh-409](https://github.com/flintlib/python-flint/pull/409),
Support building against FLINT 3.6.0. (OB)

0.8.0
-----
Expand Down
2 changes: 1 addition & 1 deletion bin/build_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ MPIRVER=3.0.0 # MPIR build no longer works (not clear where to download from)
# These are the actual dependencies used (at least by default):
GMPVER=6.3.0
MPFRVER=4.2.2
FLINTVER=3.5.0
FLINTVER=3.6.0
32 changes: 32 additions & 0 deletions bin/patch-flint-windows-arm64-link-3.6.0.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/Makefile.in b/Makefile.in
index 8185fa609..a3822f53b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -424,22 +424,16 @@ endif

ifneq ($(SHARED), 0)
shared: $(FLINT_DIR)/$(FLINT_LIB_FULL)
-# The following is to avoid reaching the maximum length of command line
-# arguments, mainly present on MinGW.
-define xxx_merged_lobj_rule
-$(BUILD_DIR)/$(1)_merged.lo: $($(1)_LOBJS) | $(BUILD_DIR)
- @$(LD) -r $($(1)_LOBJS) -o $(BUILD_DIR)/$(1)_merged.lo
-endef
-$(foreach dir, $(DIRS), $(eval $(call xxx_merged_lobj_rule,$(dir))))
-MERGED_LOBJS:=$(foreach dir, $(DIRS),$(BUILD_DIR)/$(dir)_merged.lo)
ifeq ($(WANT_LTO),1)
SHARED_LIB_DEPS:=$(LOBJS)
else
-SHARED_LIB_DEPS:=$(MERGED_LOBJS)
+SHARED_LINK_RSP := $(BUILD_DIR)/libflint-shared.rsp
+SHARED_LIB_DEPS:=$(LOBJS)
endif
-$(FLINT_DIR)/$(FLINT_LIB_FULL): $(SHARED_LIB_DEPS)
+$(FLINT_DIR)/$(FLINT_LIB_FULL): $(SHARED_LIB_DEPS) | $(BUILD_DIR)
@echo "Building $(FLINT_LIB_FULL)"
- $(CMD) $(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) $(SHARED_LIB_DEPS) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS)
+ @: $(file >$(SHARED_LINK_RSP))$(foreach obj,$(LOBJS),$(file >>$(SHARED_LINK_RSP),$(obj)))
+ $(CMD) $(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) @$(SHARED_LINK_RSP) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS)
@$(RM_F) $(FLINT_LIB)
@$(RM_F) $(FLINT_LIB_MAJOR)
@$(LN_S) $(FLINT_LIB_FULL) $(FLINT_LIB)
2 changes: 1 addition & 1 deletion doc/source/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Compatible versions:
* - 0.9.0
- Not yet
- 3.11-3.14
- 3.0-3.5
- 3.0-3.6
- 3.1-3.2?
* - 0.8.0
- 29th Aug 2025
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ project(
# then we can consider not using a speculative upper version cap here.
#
flint_lower = '>=3.0'
flint_upper = '<3.6'
flint_upper = '<3.7'
cython_lower = '>=3.0.11'
cython_upper = '<3.3'

Expand Down
13 changes: 12 additions & 1 deletion src/flint/flintlib/functions/compat.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flint.flintlib.types.flint cimport slong
from flint.flintlib.types.fmpz_mod cimport fmpz_mod_mpoly_ctx_t, fmpz_mod_mpoly_t
from flint.flintlib.types.gr cimport gr_ctx_t
from flint.flintlib.types.gr cimport gr_ctx_t, gr_ptr, gr_srcptr, gr_vec_t


cdef extern from *:
Expand Down Expand Up @@ -30,8 +30,19 @@ cdef extern from *:

#define compat_fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(...) fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(__VA_ARGS__)

#endif

#if __FLINT_RELEASE >= 30600 /* Flint 3.6.0 or later */

#define compat_gr_factor(c, factors, exponents, x, flags, ctx) gr_factor(c, factors, (fmpz_vec_struct *) exponents, x, flags, ctx)

#else

#define compat_gr_factor(c, factors, exponents, x, flags, ctx) gr_factor(c, factors, exponents, x, flags, ctx)

#endif
"""
void compat_gr_ctx_init_gr_series(gr_ctx_t ctx, gr_ctx_t base_ring, slong prec)
void compat_gr_ctx_init_series_mod_gr_poly(gr_ctx_t ctx, gr_ctx_t base_ring, slong n)
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)
int compat_gr_factor(gr_ptr c, gr_vec_t factors, gr_vec_t exponents, gr_srcptr x, int flags, gr_ctx_t ctx)
6 changes: 3 additions & 3 deletions src/flint/types/_gr.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ from flint.flintlib.functions.fmpq_poly cimport (
fmpq_poly_set,
)
from flint.flintlib.functions.compat cimport (
compat_gr_factor,
compat_gr_ctx_init_gr_series,
# compat_gr_ctx_init_series_mod_gr_poly,
)
Expand Down Expand Up @@ -159,7 +160,6 @@ from flint.flintlib.functions.gr cimport (

gr_gcd,
gr_lcm,
gr_factor,

gr_floor,
gr_ceil,
Expand Down Expand Up @@ -782,7 +782,7 @@ cdef class gr_ctx(flint_ctx):
c = self.new_gr()
gr_vec_init(factors, 0, self.ctx_t)
gr_vec_init(exponents, 0, gr_fmpz_ctx_c.ctx_t)
err = gr_factor(c.pval, factors, exponents, x.pval, flags, self.ctx_t)
err = compat_gr_factor(c.pval, factors, exponents, x.pval, flags, self.ctx_t)
if err != GR_SUCCESS:
raise self._error(err, "Failed to factor gr object")
length = gr_vec_length(factors, self.ctx_t)
Expand Down Expand Up @@ -1716,7 +1716,7 @@ cdef class gr(flint_scalar):
c = self.ctx.new_gr()
gr_vec_init(factors, 0, self.ctx.ctx_t)
gr_vec_init(exponents, 0, gr_fmpz_ctx_c.ctx_t)
err = gr_factor(c.pval, factors, exponents, self.pval, flags, self.ctx.ctx_t)
err = compat_gr_factor(c.pval, factors, exponents, self.pval, flags, self.ctx.ctx_t)
if err != GR_SUCCESS:
raise self._error(err, "Failed to factor gr object")
length = gr_vec_length(factors, self.ctx.ctx_t)
Expand Down
Loading