Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit ae3ca80

Browse files
committed
This is handled as well by the generic of Homset.__reduce__ method,
and the latter takes care of setting check=False as needed.
1 parent c1e91f3 commit ae3ca80

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/sage/modular/abvar/homspace.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,18 @@ def __init__(self, A, gens=None, category=None):
753753
sage: sage.modular.abvar.homspace.EndomorphismSubring(J1(12345))
754754
Endomorphism ring of Abelian variety J1(12345) of dimension 5405473
755755
756+
:trac:`16275` removed the custom ``__reduce__`` method, since
757+
:meth:`Homset.__reduce__` already implements appropriate
758+
unpickling by construction::
759+
760+
sage: E.__reduce__.__module__
761+
'sage.categories.homset'
762+
sage: E.__reduce__()
763+
(<function Hom at ...>,
764+
(Abelian variety J0(11) of dimension 2,
765+
Abelian variety J0(11) of dimension 2,
766+
Category of modular abelian varieties over Rational Field,
767+
False))
756768
"""
757769
self._J = A.ambient_variety()
758770
self._A = A
@@ -776,15 +788,10 @@ def __init__(self, A, gens=None, category=None):
776788
self._gens = tuple([ self._get_matrix(g) for g in gens ])
777789
self._is_full_ring = gens is None
778790

779-
def __reduce__(self):
791+
def __reduce__disabled(self):
780792
"""
781793
Used in pickling.
782794
783-
EXAMPLES::
784-
785-
sage: E = J0(31).endomorphism_ring()
786-
sage: loads(dumps(E)) == E
787-
True
788795
"""
789796
return End, (self.domain(),self.domain().category())
790797

0 commit comments

Comments
 (0)