Skip to content

Commit

Permalink
sagemath: use cython 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tornaria committed Sep 2, 2023
1 parent 7f8e651 commit df0d218
Show file tree
Hide file tree
Showing 6 changed files with 10,304 additions and 5 deletions.
50 changes: 50 additions & 0 deletions srcpkgs/sagemath/patches/36109-00pre.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Pre-patch so that PR #36109 applies cleanly on top of 10.1

diff --git a/src/sage/categories/hopf_algebras_with_basis.py b/src/sage/categories/hopf_algebras_with_basis.py
index ea401896ca0..29b6f48a86f 100644
--- a/src/sage/categories/hopf_algebras_with_basis.py
+++ b/src/sage/categories/hopf_algebras_with_basis.py
@@ -33,11 +33,11 @@ class HopfAlgebrasWithBasis(CategoryWithAxiom_over_base_ring):
We now show how to use a simple Hopf algebra, namely the group algebra of the dihedral group
(see also AlgebrasWithBasis)::

- sage: A = C.example(); A # optional - sage.groups
+ sage: A = C.example(); A # needs sage.groups
An example of Hopf algebra with basis: the group algebra of the
Dihedral group of order 6 as a permutation group over Rational Field
- sage: A.__custom_name = "A" # optional - sage.groups
- sage: A.category() # optional - sage.groups
+ sage: A.__custom_name = "A" # needs sage.groups
+ sage: A.category() # needs sage.groups
Category of finite dimensional hopf algebras with basis over Rational Field

sage: A.one_basis() # optional - sage.groups
diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py
index 85a0d50239a..c0e29886b5f 100644
--- a/src/sage/categories/modules_with_basis.py
+++ b/src/sage/categories/modules_with_basis.py
@@ -66,9 +66,9 @@ class ModulesWithBasis(CategoryWithAxiom_over_base_ring):

Let `X` and `Y` be two modules with basis. We can build `Hom(X,Y)`::

- sage: X = CombinatorialFreeModule(QQ, [1,2]); X.__custom_name = "X" # optional - sage.modules
- sage: Y = CombinatorialFreeModule(QQ, [3,4]); Y.__custom_name = "Y" # optional - sage.modules
- sage: H = Hom(X, Y); H # optional - sage.modules
+ sage: X = CombinatorialFreeModule(QQ, [1,2]); X.__custom_name = "X" # needs sage.modules
+ sage: Y = CombinatorialFreeModule(QQ, [3,4]); Y.__custom_name = "Y" # needs sage.modules
+ sage: H = Hom(X, Y); H # needs sage.modules
Set of Morphisms from X to Y
in Category of finite dimensional vector spaces with basis over Rational Field

diff --git a/src/sage/misc/cachefunc.pyx b/src/sage/misc/cachefunc.pyx
index dac4c684f47..9b2916e547d 100644
--- a/src/sage/misc/cachefunc.pyx
+++ b/src/sage/misc/cachefunc.pyx
@@ -297,6 +297,7 @@ methods of extension classes, as long as they either support attribute assignmen
or have a public attribute of type ``<dict>`` called ``__cached_methods``. The
latter is easy::

+ sage: # needs sage.misc.cython
sage: cython_code = [
....: "from sage.misc.cachefunc import cached_method",
....: "cdef class MyClass:",
Loading

0 comments on commit df0d218

Please sign in to comment.