Skip to content
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

Update Cython to 3.0.0 #36054

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2a6ceb4
rename __cached_methods -> _cached_methods
infmagic2047 Aug 7, 2023
749f11c
rename __init_fun -> _init_fun
infmagic2047 Aug 7, 2023
06961a9
rename __value -> _value
infmagic2047 Aug 7, 2023
347a58c
rename __hardy_z_function -> _hardy_z_function
infmagic2047 Aug 7, 2023
dfb0c2b
rename __compute_rank -> _compute_rank
infmagic2047 Aug 7, 2023
03323bb
rename __typedN -> _typedN
infmagic2047 Aug 7, 2023
ca8a2f6
rename __find_zeros_v -> _find_zeros_v
infmagic2047 Aug 7, 2023
8344061
rename __find_zeros -> _find_zeros
infmagic2047 Aug 7, 2023
722de4e
rename __is_exchange_pair -> _is_exchange_pair
infmagic2047 Aug 7, 2023
a69534f
rename __exchange -> _exchange
infmagic2047 Aug 7, 2023
edef800
rename __exchange_value -> _exchange_value_internal
infmagic2047 Aug 7, 2023
2307d0f
rename __coclosure -> _coclosure_internal
infmagic2047 Aug 7, 2023
9d12ba3
fix use of private __pack
infmagic2047 Aug 7, 2023
9e8ebeb
fix use of private __pack
infmagic2047 Aug 7, 2023
4d19b07
rename __modulus -> _modulus
infmagic2047 Aug 7, 2023
945435c
rename __normalize -> _normalize
infmagic2047 Aug 7, 2023
98c48fa
rename __coeffs -> _coeffs
infmagic2047 Aug 7, 2023
efbdfe5
rename __ngens -> _ngens
infmagic2047 Aug 7, 2023
ae64ab9
fix use of private __ideal_monoid
infmagic2047 Aug 7, 2023
98657c4
rename __allocated -> _allocated
infmagic2047 Aug 7, 2023
01fe8f2
rename __denominator -> _denominator
infmagic2047 Aug 7, 2023
b6abb70
rename __numerator -> _numerator
infmagic2047 Aug 7, 2023
7b2bd0e
rename __temporarily_change_names -> _temporarily_change_names
infmagic2047 Aug 7, 2023
34e01aa
rename __term_order -> _term_order
infmagic2047 Aug 7, 2023
4b593fe
rename __custom_name -> _custom_name
infmagic2047 Aug 7, 2023
0b8aace
rename __crt -> _crt
infmagic2047 Aug 7, 2023
e71dda4
fix use of private __is_gen
infmagic2047 Aug 7, 2023
0469f75
fix use of private __subset
infmagic2047 Aug 7, 2023
edbdac0
fix use of private __relabel
infmagic2047 Aug 7, 2023
0877c40
rename __fld_denominator -> _fld_denominator
infmagic2047 Aug 7, 2023
a4d4ba0
rename __fld_numerator -> _fld_numerator
infmagic2047 Aug 7, 2023
77fc77d
rename __prec -> _prec
infmagic2047 Aug 7, 2023
a4b597c
rename __poly -> _poly
infmagic2047 Aug 7, 2023
3142227
fix private methods used in doctests
infmagic2047 Aug 7, 2023
58df1a9
fix PY_NEW signature
infmagic2047 Aug 7, 2023
0c3ed27
avoid naming attributes __module__ in cython 3
infmagic2047 Aug 7, 2023
d5f3e3a
force __getmetaclass__ to be a METH_NOARGS method
infmagic2047 Aug 7, 2023
5afb200
fix structmember.h defines in cython 3
infmagic2047 Aug 7, 2023
4fefac1
avoid StopIteration in generators
infmagic2047 Aug 7, 2023
6bcabe4
update cython to 3.0.0
infmagic2047 Aug 7, 2023
4a50dc1
add cython3 patches for cysignals, cypari2, fpylll, and pplpy
infmagic2047 Aug 7, 2023
c50d2db
add cython3 patch for scipy
infmagic2047 Aug 8, 2023
3409ddc
use cython legacy directives for sage
infmagic2047 Aug 8, 2023
27acee3
remove coxeter CoxGraph which fails to compile with cython 3
infmagic2047 Aug 8, 2023
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
32 changes: 32 additions & 0 deletions build/pkgs/cypari/patches/cython3-legacy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
commit 8ef356a4eb936c37f55a5c501f3a955e6740c0c5
Author: Gonzalo Tornaría <[email protected]>
Date: Wed Jul 19 19:45:23 2023 -0300

cython3 support using legacy directives

diff --git a/cypari2/gen.pyx b/cypari2/gen.pyx
index 247b1ad..75050a0 100644
--- a/cypari2/gen.pyx
+++ b/cypari2/gen.pyx
@@ -329,7 +329,7 @@ cdef class Gen(Gen_base):
>>> pari = Pari()
>>> L = pari("vector(10,i,i^2)")
>>> L.__iter__()
- <generator object at ...>
+ <...generator object at ...>
>>> [x for x in L]
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
>>> list(L)
diff --git a/setup.py b/setup.py
index 2188711..455337f 100755
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,8 @@ class build_ext(_build_ext):
"binding": True,
"cdivision": True,
"language_level": 2,
+ "legacy_implicit_noexcept": True,
+ "c_api_binop_methods": True,
}

_build_ext.finalize_options(self)
30 changes: 30 additions & 0 deletions build/pkgs/cysignals/patches/cython3-legacy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
commit 9996a4028ddc7f9a5ffda3df65d5b7d3b7df8aa5
Author: Gonzalo Tornaría <[email protected]>
Date: Wed Jul 19 18:34:57 2023 -0300

cython3 support using legacy directives

diff --git a/setup.py b/setup.py
index 37acdfc..f68270b 100755
--- a/setup.py
+++ b/setup.py
@@ -157,13 +157,17 @@ class build_ext(_build_ext):
# Run Cython with -Werror on continuous integration services
# with Python 3.6 or later
from Cython.Compiler import Options
- Options.warning_errors = True
+ Options.warning_errors = False

from Cython.Build.Dependencies import cythonize
return cythonize(extensions,
build_dir=cythonize_dir,
include_path=["src", os.path.join(cythonize_dir, "src")],
- compiler_directives=dict(binding=True, language_level=2))
+ compiler_directives=dict(
+ binding=True,
+ language_level=2,
+ legacy_implicit_noexcept=True,
+ ))


class build_py(_build_py):
6 changes: 3 additions & 3 deletions build/pkgs/cython/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=Cython-VERSION.tar.gz
sha1=015b737107304a5777f5c6552ffb12713684c924
md5=91c36ea86c00adcc5c1c11cf48b733c0
cksum=1793363471
sha1=cbf05e7e4937388fa21e8fa3113124b036f01eba
md5=63c5672e1f58dcee6854aef8b33a922e
cksum=1763712438
upstream_url=https://pypi.io/packages/source/C/Cython/Cython-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/cython/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cython >=0.29.21, <1.0
cython >=3.0, <4.0
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.29.32.p2
3.0.0
287 changes: 0 additions & 287 deletions build/pkgs/cython/patches/4918.patch

This file was deleted.

Loading
Loading