-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Weighted degree term orders added #11316
Comments
Author: Kwankyu Lee |
comment:1
I think that using a method is a preferred way to get a property of an object rather than using an attribute, in Sage. So the attribute "blocks" of TermOrder is now a method. Use t.blocks() instead of t.blocks Perhaps this change will require a deprecation warning. I am not sure how to do this for attributes. |
comment:3
Regarding to converting "blocks" to "blocks()", Jason remarks: To my understanding, we prefer methods to properties because:
I really wish we could use properties more, as it is more pythonic and |
comment:4
So, the only real issue seems to be pickling. |
comment:5
I rebased the patch on 4.7.rc2. pbori.pyx is no longer a problem. I am not familiar with pickling. As I understand it, the patch modified the data structure of TermOrder objects in such an incompatible way that the old pickled TermOrder objects stored in the "pickle jar" of Sage is no longer properly unpickled. So it is not a bug of the patch but an incompatible change in the data structure that cause the unpickling failures. Please confirm this. I don't know what to do with this. A quick way to fix this is just to update the "pickle jar" of Sage, and, perhaps, this is up to the release manager, and perhaps a consensus in sage-devel is required. My reference is I change the status of this ticket to "needs review" to get attention. Is "needs info" the right status? |
comment:6
Replying to @kwankyu:
Your technical description seems right. However, in Sage's convention it is considered a bug if the pickle jar breaks.
This is not what is supposed to happen. The point of the pickle jar is to ensure old objects can be unpickled.
needs info or needs work are both fine as far as I understand it. You can start debugging it by calling
I'll also try to take a look soon-ish. |
Attachment: trac_11316.patch.gz |
comment:7
There was a bug in the matrix order of Sage, which did not allow negative integers in the matrix. This is fixed in the current patch. |
comment:8
btw. I read the patch and it looks good. The only thing I don't like are the double underscore attributes (most of which you inherited from other people like me). But we should add more of those, so I'd suggest at least |
comment:10
Perhaps, this is a good way of dealing with this: def __getattr__(self,'name'):
if name == "_weights": # I don't think it works for double underscore attributes?
self._weights = None
return self._weights
else:
raise AttributeError("'TermOrder' has no attribute '%s'"%name) |
Attachment: trac_11316.2.patch.gz fixed the unpickling failures |
comment:11
I kept double underscores in the new patch. I don't know why Martin do not like double underscore attributes. Do you think single underscore attributes are generally preferable over double ones? Or is it just for fixing unpickling problem. |
Merged: sage-4.7.1.alpha3 |
Changed merged from sage-4.7.1.alpha3 to none |
comment:35
There are some issues on Solaris. On the "marks" and "t2" buildbots, I get the following error (identical on both systems):
|
comment:37
Hi Jeroen, Replying to @jdemeyer:
That test has only been introduced by #11431. Hence, I am reverting the ticket here into "positive review" |
comment:38
Or perhaps I was too quick. After all, one of the patches changes sage/libs/singular/ring.pyx, and it is imaginable that this has an effect on singular. I have no recent working Sage version on my t2 account. Could you please test whether the line
works without and with the patch applied? |
comment:39
Replying to @simon-king-jena:
I have no account on |
comment:40
Replying to @jdemeyer:
I am not able to build Sage on |
comment:41
Replying to @jdemeyer:
Too bad. I am now trying to build on mark -- no idea whether it will work, of course. One question: Wouldn't it be possible to use the Sage version that was built by the buildbot? |
comment:42
As much as I understand, the ticket here is independent from #11431, right? It turned out that the Solaris problem pointed out by Jeroen exists in a fresh sage-4.7.1.rc1 installation on mark. In particular, the problem was definitely not introduced by the patch here. |
comment:43
For the reason pointed out in my previous post, I think it is alright to reinstate the positive review. |
Merged: sage-4.7.2.alpha1 |
Weighted degree term orders (wp,Wp,ws,Ws as in Singular) added to TermOrder.
New term orders as well as matrix term orders can be used in block term orders.
Apply:
attachment: trac_11316.4.patch
attachment: trac11316_reviewer.patch
CC: @burcin @qed777
Component: basic arithmetic
Author: Kwankyu Lee
Reviewer: Simon King
Merged: sage-4.7.2.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/11316
The text was updated successfully, but these errors were encountered: