Skip to content

Commit

Permalink
Trac #31445: cython: Upgrade to 0.29.24, fix Cython 3.0 future-warnings
Browse files Browse the repository at this point in the history
https://cython.readthedocs.io/en/latest/src/changes.html#id15

URL: https://trac.sagemath.org/31445
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): François Bissey
  • Loading branch information
Release Manager committed Aug 22, 2021
2 parents 88f4def + 153a5df commit 0f90910
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
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=3aafce4489a7bc7a48c843cdfb8dac4677fdac50
md5=12c5e45af71dcc6dff28cdcbcbef6f39
cksum=3658613797
sha1=21187175b7da94020e662c04f805d580f1071880
md5=81aff945f5bfdfb86e7a5d24f5467668
cksum=2423037501
upstream_url=https://pypi.io/packages/source/C/Cython/Cython-VERSION.tar.gz
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.21
0.29.24
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/partn_ref2/refinement_generic.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cdef class LabelledBranching:
cdef int count
cdef int *father
cdef int *act_perm
cpdef GapElement group, ClosureGroup
cdef GapElement group, ClosureGroup
cdef Parent sym_gp
cdef bint has_empty_intersection(self, PartitionStack * part)
cpdef add_gen(self, GapElement_Permutation gen)
Expand Down
10 changes: 5 additions & 5 deletions src/sage/matrix/matrix_modn_dense_template.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ cdef inline linbox_echelonize(celement modulus, celement* entries, Py_ssize_t nr
cdef size_t* Q = <size_t*>check_allocarray(ncols, sizeof(size_t))

cdef Py_ssize_t r
cpdef size_t nbthreads
cdef size_t nbthreads
nbthreads = Parallelism().get('linbox')
cdef bool transform = False
if nrows*ncols > 1000: sig_on()
Expand Down Expand Up @@ -254,8 +254,8 @@ cdef inline int linbox_rank(celement modulus, celement* entries, Py_ssize_t nrow

cdef celement *cpy = linbox_copy(modulus, entries, nrows, ncols)

cpdef Py_ssize_t r
cpdef size_t nbthreads
cdef Py_ssize_t r
cdef size_t nbthreads
nbthreads = Parallelism().get('linbox')
if nrows*ncols > 1000: sig_on()
if nbthreads > 1:
Expand All @@ -275,7 +275,7 @@ cdef inline celement linbox_det(celement modulus, celement* entries, Py_ssize_t
cdef celement *cpy = linbox_copy(modulus, entries, n, n)

cdef celement d
cpdef size_t nbthreads
cdef size_t nbthreads
nbthreads = Parallelism().get('linbox')

if n*n > 1000: sig_on()
Expand All @@ -297,7 +297,7 @@ cdef inline celement linbox_matrix_matrix_multiply(celement modulus, celement* a
F[0].init(one, <int>1)
F[0].init(zero, <int>0)

cpdef size_t nbthreads
cdef size_t nbthreads
nbthreads = Parallelism().get('linbox')

if m*n*k > 100000: sig_on()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/numerical/backends/generic_sdp_backend.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cdef class GenericSDPBackend:
cpdef zero(self)
cpdef base_ring(self)

cpdef obj_constant_term
cdef obj_constant_term
cdef dict matrices_dim

cpdef GenericSDPBackend get_solver(solver=?, base_ring=?)
2 changes: 1 addition & 1 deletion src/sage/numerical/linear_tensor_element.pxd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from sage.structure.element cimport Element, ModuleElement

cdef class LinearTensor(ModuleElement):
cpdef dict _f
cdef dict _f
cpdef _add_(self, other)
2 changes: 1 addition & 1 deletion src/sage/rings/laurent_series_ring_element.pxd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sage.structure.element cimport AlgebraElement, ModuleElement

cdef class LaurentSeries(AlgebraElement):
cpdef ModuleElement __u
cdef ModuleElement __u
cdef long __n

cdef __normalize(self)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/padics/CR_template.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ cdef class CRElement(pAdicTemplateElement):
...
PrecisionError: precision higher than allowed by the precision cap
"""
cpdef CRElement ans
cdef CRElement ans
if absprec == maxordp:
if self.relprec == 0:
ans = self._new_c()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/laurent_polynomial.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cdef class LaurentPolynomial(CommutativeAlgebraElement):
cpdef dict dict(self)

cdef class LaurentPolynomial_univariate(LaurentPolynomial):
cpdef ModuleElement __u
cdef ModuleElement __u
cdef long __n
cpdef __normalize(self)
cpdef _unsafe_mutate(self, i, value)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/power_series_mpoly.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from sage.structure.element cimport ModuleElement
from .power_series_ring_element cimport PowerSeries

cdef class PowerSeries_mpoly(PowerSeries):
cpdef ModuleElement __f
cdef ModuleElement __f
cdef object __poly
cdef object __list
cdef bint _truncated
2 changes: 1 addition & 1 deletion src/sage/rings/puiseux_series_ring_element.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ from sage.structure.element cimport AlgebraElement, ModuleElement
from sage.rings.laurent_series_ring_element cimport LaurentSeries

cdef class PuiseuxSeries(AlgebraElement):
cpdef LaurentSeries _l
cdef LaurentSeries _l
cdef size_t _e

0 comments on commit 0f90910

Please sign in to comment.