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
sage-4.4.3, 4.4.4: Basic pickling bug in finite fields #9315
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
There is a function in finite_field_base.pyx that tries to pickle. It has doctests but clearly can never actually work if run, i.e., it is never actually tested. Here's the function:
However, _factory_data is not defined anywhere else in the source code:
|
comment:2
Attachment: trac_9315.patch.gz |
comment:4
I get this doctest failure (and no more in finite_rings):
|
comment:5
And a similar failure in sage/rings/polynomial/multi_polynomial_libsingular.pyx |
comment:6
Doctesting the whole the tree: http://sage.math.washington.edu/home/wstein/build/sage-4.5.alpha4/doctest-9315.out |
apply only this; I updated the patch to address the issues John pointed out, and clearly document what the whole point of _factory_data is (I was confused before). |
comment:7
Attachment: trac_9315.2.patch.gz |
Reviewer: John Cremona |
comment:8
I am reviewing this now. Question: is it not possible to avoid the code duplication? Could we not have a I guess that you considered this already, and that it is harder than I am suggesting. On with the testing, anyway! |
Author: William Stein |
comment:9
#9409 may well be ok after this; I will test that. |
comment:10
Replying to @JohnCremona:
Yes, i tried for several hours to figure out how to do that and failed completely. Obviously, if somrbody can find a way to do whatvyou propose that might be good. But the fact is the currrent patch fixes a major bug, and nobody has suggested a better fix.
|
comment:11
Replying to @williamstein:
I guessed you would have tried.
All tests pass (sage -tp 10 -long). Unfortunately, this does not fix #9409. But as it is not certain that pickling of residue fields is the issue there (though I reckon it must be) I will not delay this one on that account. |
comment:12
By "pickling" maybe you mean "caching"? I didn't make any changes at all, whatsoever to caching. The only actual change my patch makes is that the default |
comment:13
Replying to @williamstein:
OK, I just don't know what I am talking about.... |
Merged: sage-4.6.alpha1 |
If you try to pickle any residue class field, then it breaks!
CC: @JohnCremona
Component: basic arithmetic
Author: William Stein
Reviewer: John Cremona
Merged: sage-4.6.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/9315
The text was updated successfully, but these errors were encountered: