File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,16 @@ Compatible versions:
144144
145145| python-flint | Release date | CPython | FLINT | Cython |
146146| --------------| ---------------| -------------| ------------| ------------------|
147+ | ` 0.9.0 ` | ??? | ` 3.11-3.14 ` | ` 3.0-3.3 ` | ` 3.1-3.2? ` |
147148| ` 0.8.0 ` | 29th Aug 2025 | ` 3.11-3.14 ` | ` 3.0-3.3 ` | ` 3.1 ` only |
148149| ` 0.7.0 ` | 16th Mar 2025 | ` 3.11-3.13 ` | ` 3.0-3.2 ` | ` 3.0.11-3.1.0a1 ` |
149150| ` 0.6.0 ` | 1st Feb 2024 | ` 3.9-3.12 ` | ` 3.0 ` only | ` 3.0 ` only |
150151
151152The requirement for Cython 3.1 is only for CPython's free-threaded build.
152- Otherwise Cython 3.0 is fine. As of python-flint 0.7.0, CPython 3.13 [ PEP
153+ Otherwise Cython 3.0 is fine. Cython 3.2 is required for a stable ABI build of
154+ python-flint.
155+
156+ As of python-flint 0.7.0, CPython 3.13 [ PEP
153157703] ( https://peps.python.org/pep-0703/ ) free-threaded (no-GIL) builds of
154158python-flint are provided. In the the free-threaded build, mutating matrices or
155159polynomials from multiple threads can lead to memory corruption. There are some
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ project(
1515flint_lower = ' >=3.0'
1616flint_upper = ' <3.4'
1717cython_lower = ' >=3.0.11'
18- cython_upper = ' <3.2 '
18+ cython_upper = ' <3.3 '
1919
2020py = import (' python' ).find_installation(pure : false )
2121dep_py = py.dependency ()
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ content-type = "text/markdown"
4141# fine. It is not possible to have a separate version constraint here for the
4242# freethreading build only though.
4343#
44- requires = [" meson-python >= 0.18" , " cython >=3.1,<3.2 " ]
44+ requires = [" meson-python >= 0.18" , " cython >=3.1,<3.3 " ]
4545build-backend = " mesonpy"
4646
4747[tool .meson-python ]
Original file line number Diff line number Diff line change @@ -602,11 +602,11 @@ cdef class gr_ctx(flint_ctx):
602602 # ##
603603 # Square Roots
604604
605- def is_square (self , x ):
605+ def is_square (self , x ) -> bool | None :
606606 """
607607 Returns whether x is a perfect square in the context.
608608 """
609- return self ._is_square(self (x))
609+ return truth_to_py( self._is_square(self(x ) ))
610610
611611 def sqrt(self , x ) -> gr:
612612 """
@@ -1912,7 +1912,7 @@ cdef class gr(flint_scalar):
19121912 >>> Q(4).sqrt()
19131913 2
19141914 """
1915- return truth_to_py( self .ctx.is_square(self ) )
1915+ return self .ctx.is_square(self )
19161916
19171917 def sqrt (self ):
19181918 """ Return the square root of the element if it exists.
You can’t perform that action at this time.
0 commit comments