#13394: Write a WeakValueDictionary with safer key removal
-------------------------------------+-------------------------------------
Reporter: nbruin | Owner: rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.13
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: None of the above | Work issues:
- read trac for reasoning. | Commit:
Branch: | e4adaebf2bd8a219f05b28746210cc0b0d0bba88
u/SimonKing/ticket/13394 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Interestingly, when merging this with #15303, I get one doctest failure in
`sage.schemes.generic.divisor_group.DivisorGroup_curve._element_constructor_`,
namely:
{{{
File "src/sage/schemes/generic/divisor_group.py", line 272, in
sage.schemes.generic.divisor_group.DivisorGroup_curve._element_constructor_
Failed example:
DivZZ=C.divisor_group(ZZ)
Exception raised:
Traceback (most recent call last):
File "/home/king/Sage/git/sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/home/king/Sage/git/sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest
sage.schemes.generic.divisor_group.DivisorGroup_curve._element_constructor_[2]>",
line 1, in <module>
DivZZ=C.divisor_group(ZZ)
File "/home/king/Sage/git/sage/local/lib/python2.7/site-
packages/sage/schemes/plane_curves/curve.py", line 81, in divisor_group
return DivisorGroup(self, base_ring)
File "/home/king/Sage/git/sage/local/lib/python2.7/site-
packages/sage/schemes/generic/divisor_group.py", line 52, in DivisorGroup
DG = DivisorGroup_curve(scheme, base_ring)
File "classcall_metaclass.pyx", line 330, in
sage.misc.classcall_metaclass.ClasscallMetaclass.__call__
(sage/misc/classcall_metaclass.c:1224)
File "/home/king/Sage/git/sage/local/lib/python2.7/site-
packages/sage/schemes/generic/divisor_group.py", line 100, in
__classcall__
return UniqueRepresentation.__classcall__(cls, scheme, base_ring)
File "cachefunc.pyx", line 1028, in
sage.misc.cachefunc.WeakCachedFunction.__call__
(sage/misc/cachefunc.c:5628)
File "weak_dict.pyx", line 655, in
sage.misc.weak_dict.WeakValueDictionary.__getitem__
(sage/misc/weak_dict.c:4012)
IndexError: list index out of range
}}}
So, it seems that I need to fix this.
--
Ticket URL: <http://trac.sagemath.org/ticket/13394#comment:31>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.