#9003: Doctest (or whatever???) failure on Mac OS X in free_module.py
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.4.3
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Comment(by GeorgSWeber):
Ah, I should have worked on a different project, but just couldn't.
Currently, I know the following:[[BR]]
* There is a line {{{V = QQ^7}}} elsewhere in the same doctest
* Sage stores free modules of some rank over some ring only once, see
free_module.py/factory.pyx
* so if {{{testname = ZZ^7}}}, then {{{testname.base_extend(QQ)}}} will
refer to the same object as V before (!), albeit there is some "weakref"
magic I don't understand
* in this factory.pyx and weakref magic, the version number of Sage plays
some role unclear to me (but at least there is some hint to from where the
difference comes)
* if the Sage version reads '4.4.2', then this object above has during
the evalution in the doctest an attribute "{{{__custom_name}}}" set to the
string "V", so this is why "V" is printed (as is clear from
"sage_object.pyx", see {{{__repr__()}}} there)
* after the *only* change making the Sage version to be '4.4.2.rc0' (note
that the item after the last dot is not a number ...), then this object
during evaluation of the doctest does not have this attribute
"{{{__custom_name}}}" (direct evaluation now gives an AttributeError)
IMPORTANT NOTE: If one takes Sage-4.4.2.alpha0, and just alters in
version.py the Sage version to read something with numbers only (e.g.
"4.4.2"), then the bug becomes visible! So the problem must be in one of
the patches in between Sage-4.4.1 and Sage-4.4.2.alpha0 --- and was only
"shadowed" by the version number ending with a string (see factory.pyx
lines 8 - 14 why this might be relevant --- I do not really know, why this
hurts ... possibly garbage collection/weakref somehow acting differently,
since the string "alpha0" (or "rc0") *is* being referenced?)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9003#comment:20>
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.