Skip to content

Commit 9ffc65d

Browse files
author
Matthias Koeppe
committed
sage.structure: Update # needs
1 parent 9155c18 commit 9ffc65d

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

src/sage/structure/coerce_dict.pyx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,19 @@ coerce maps. In previous versions of Sage, the cache was by strong
3535
references and resulted in a memory leak in the following example.
3636
However, this leak was fixed by :trac:`715`, using weak references::
3737
38-
sage: K.<t> = GF(2^55) # needs sage.rings.finite_rings
39-
sage: for i in range(20): # needs sage.rings.finite_rings
38+
sage: # needs sage.combinat sage.modules sage.rings.finite_rings
39+
sage: K.<t> = GF(2^55)
40+
sage: for i in range(20):
4041
....: a = K.random_element()
4142
....: E = EllipticCurve(j=a)
4243
....: P = E.random_point()
4344
....: Q = 2*P
44-
sage: L = [Partitions(n) for n in range(200)] # purge strong cache in CachedRepresentation # needs sage.combinat sage.rings.finite_rings
45+
sage: L = [Partitions(n) for n in range(200)] # purge strong cache in CachedRepresentation
4546
sage: import gc
4647
sage: n = gc.collect()
47-
sage: from sage.schemes.elliptic_curves.ell_finite_field import EllipticCurve_finite_field # needs sage.combinat sage.rings.finite_rings
48-
sage: LE = [x for x in gc.get_objects() if isinstance(x, EllipticCurve_finite_field)] # needs sage.combinat sage.rings.finite_rings
49-
sage: len(LE) # needs sage.combinat sage.rings.finite_rings
48+
sage: from sage.schemes.elliptic_curves.ell_finite_field import EllipticCurve_finite_field
49+
sage: LE = [x for x in gc.get_objects() if isinstance(x, EllipticCurve_finite_field)]
50+
sage: len(LE)
5051
1
5152
"""
5253

src/sage/structure/element.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4384,11 +4384,12 @@ cdef class FieldElement(CommutativeRingElement):
43844384
43854385
Test if :trac:`8671` is fixed::
43864386
4387+
sage: # needs sage.libs.pari sage.libs.singular
43874388
sage: R.<x,y> = QQ[]
4388-
sage: S.<a,b> = R.quo(y^2 + 1) # needs sage.libs.pari
4389-
sage: S.is_field = lambda: False # needs sage.libs.pari
4390-
sage: F = Frac(S); u = F.one() # needs sage.libs.pari
4391-
sage: u.quo_rem(u) # needs sage.libs.pari
4389+
sage: S.<a,b> = R.quo(y^2 + 1)
4390+
sage: S.is_field = lambda: False
4391+
sage: F = Frac(S); u = F.one()
4392+
sage: u.quo_rem(u)
43924393
(1, 0)
43934394
"""
43944395
if not isinstance(right, FieldElement) or not (parent(right) is self._parent):

src/sage/structure/factorization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,15 @@
125125
126126
Factorizations can involve fairly abstract mathematical objects::
127127
128-
sage: F = ModularSymbols(11,4).factorization(); F # optional - sage.modular
128+
sage: # needs sage.modular
129+
sage: F = ModularSymbols(11,4).factorization(); F
129130
(Modular Symbols subspace of dimension 2 of Modular Symbols space
130131
of dimension 6 for Gamma_0(11) of weight 4 with sign 0 over Rational Field) *
131132
(Modular Symbols subspace of dimension 2 of Modular Symbols space
132133
of dimension 6 for Gamma_0(11) of weight 4 with sign 0 over Rational Field) *
133134
(Modular Symbols subspace of dimension 2 of Modular Symbols space
134135
of dimension 6 for Gamma_0(11) of weight 4 with sign 0 over Rational Field)
135-
sage: type(F) # optional - sage.modular
136+
sage: type(F)
136137
<class 'sage.structure.factorization.Factorization'>
137138
138139

src/sage/structure/factory.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,12 @@ cdef class UniqueFactory(SageObject):
518518
The ``GF`` factory used to have a custom :meth:`other_keys`
519519
method, but this was removed in :trac:`16934`::
520520
521-
sage: key, _ = GF.create_key_and_extra_args(27, 'k'); key # needs sage.rings.finite_rings
521+
sage: # needs sage.libs.linbox sage.ring.finite_rings
522+
sage: key, _ = GF.create_key_and_extra_args(27, 'k'); key
522523
(27, ('k',), x^3 + 2*x + 1, 'givaro', 3, 3, True, None, 'poly', True, True, True)
523-
sage: K = GF.create_object(0, key); K # needs sage.rings.finite_rings
524+
sage: K = GF.create_object(0, key); K
524525
Finite Field in k of size 3^3
525-
sage: GF.other_keys(key, K) # needs sage.rings.finite_rings
526+
sage: GF.other_keys(key, K)
526527
[]
527528
528529
sage: K = GF(7^40, 'a') # needs sage.rings.finite_rings

0 commit comments

Comments
 (0)