#11521: Use weak references to cache homsets
------------------------+---------------------------------------------------
Reporter: jpflori | Owner: robertwb
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.0
Component: coercion | Keywords: sd35
Work_issues: | Upstream: N/A
Reviewer: | Author: Simon King
Merged: | Dependencies: #11900 #715
------------------------+---------------------------------------------------
Changes (by SimonKing):
* status: needs_review => needs_work
Comment:
When applying the new patch from #715, all tests pass. But when also
applying the patch from here, `make ptest` results in
{{{
sage -t -force_lib devel/sage/sage/libs/singular/ring.pyx # 6 doctests
failed
}}}
The failing tests concern `ring_refcount_dict` - and it is perhaps not
surprising that a patch enabling garbage collection of rings has an
influence on refcount, such as:
{{{
sage: ring_ptr =
set(ring_refcount_dict.keys()).difference(prev_rings).pop()
Exception raised:
Traceback (most recent call last):
File "/home/simon/SAGE/sage-5.0.prealpha0/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/simon/SAGE/sage-5.0.prealpha0/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/simon/SAGE/sage-5.0.prealpha0/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_8[9]>", line 1, in <module>
ring_ptr =
set(ring_refcount_dict.keys()).difference(prev_rings).pop()###line 452:
sage: ring_ptr =
set(ring_refcount_dict.keys()).difference(prev_rings).pop()
KeyError: 'pop from an empty set'
}}}
Anyway, I need to analyse what happens, and provide a new patch after
catching some sleep.
Jean-Pierre, I hope you like the new ticket title!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11521#comment:119>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.