-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElementWrapper: doctests improvements to not abuse ZZ invariants #8200
Comments
comment:1
Attachment: trac_8200-element_wrapper_doctests-nt.patch.gz |
Changed author from Nicolas M. Thiéry to Florent Hivert, Nicolas M. Thiéry |
comment:3
This applied fine and passed
for 4.3.2.rc0 on a mac 10.6.2. Running sage -testall now. |
comment:4
This passed sage -testall on a mac 10.6.2 applied to 4.3.2.rc0. However, am not competent to judge the patch. Hopefully someone else can read it over and give a positive review. |
comment:5
This patch itself looks fine and passes tests. However, it's critical that a patch to address this problem at least include a comment that completely explains the problem. As it is, this patch just hides a problem that will certainly cause similar great confusion and pain later. So another patch that includes a statement of the problem is needed. A trivial way to do this, would be to just link to this trac ticket, and post something here. I'll add a 1-line addition to the patch above. And here's a good description of the full problem from emails:
|
comment:6
I realized the comments in element_wrapper.py still refer to Integer, so that is wrong in your patch. |
comment:7
Actually, the above comment is wrong. Never mind about that. |
apply after the other patch. |
comment:8
Attachment: trac-8200-part2-referee.patch.gz |
comment:9
Replying to @williamstein:
Thanks for the review.
I fully agree that the issue with ZZ/Integer should not be left hidden, which is precisely why I forked this ticket in two. But sorry, I don't accept the reviewer's patch. Integer/ZZ is broken. That's the purpose of #8177. Abusing ElementWrapper with ZZ as parent was broken. That's the purpose of this ticket. But ElementWrapper in itself is not broken (well at least in this context). Any other Sage element class that accepts a parent as input (that is most of them) would trigger the exact same issue when abused the same way. I don't want people to be scared away of ElementWrapper because of an issue elsewhere. |
Changed reviewer from Florent Hivert to William Stein |
This comment has been minimized.
This comment has been minimized.
comment:11
Merged into sagenb-4.3.2 (wstein version -- post minh). |
Merged: sage-4.3.2.final |
The attached patch updates the doctests of ElementWrapper to use a custom dummy parent, rather than abusing from ZZ. This abuse could trigger a segfault (see #8177).
I put this back to "needs review", without the reviewer's patch.
CC: @sagetrac-sage-combinat
Component: doctest coverage
Keywords: ElementWrapper
Author: Florent Hivert, Nicolas M. Thiéry
Reviewer: William Stein
Merged: sage-4.3.2.final
Issue created by migration from https://trac.sagemath.org/ticket/8200
The text was updated successfully, but these errors were encountered: