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
Issue when pickling a formal function #11919
Comments
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to pynac |
comment:5
I hit this independently using deepcopy(). In sage-4.7:
and in 4.8.alpha5:
|
comment:6
Interestingly, if I take the pynac spkg from 4.7 and install it on 5.0.beta7, it doesn't fix the crash. |
comment:7
I built a copy of 4.7.1, and the crash does happen. So the change was introduced between 4.7 and 4.7.1. |
comment:8
Okay, this broke with #9240. I can fix it with a one-line change in 4.7.1.alpha4:
But there's no longer a |
comment:9
Replying to @orlitzky:
Disregard that, I'm a moron. Testing a patch now. |
Attachment: sage-trac_11919.patch.gz |
Author: Michael Orlitzky |
comment:11
I had the same problem on Sage 4.7.1. I applied the patch described above but it didn't work (same error message). I then uninstalled sage and installed version 4.8 instead. I applied the patch again and it still didn't work. Any suggestions? |
comment:12
Replying to @sagetrac-abid-naqvi83:
Did you remember to run I don't remember which version I created the patch against... Does it at least apply cleanly against 4.8? |
comment:13
Fix confirmed! indeed, the patch simply adds back a line that disappeared in #9240 without any reason stated, so probably that was just an accident. Positive review! (for abid_naqvi83: note that the patchbot is happy and that the feature is actually doctested. If the fix has no effect, perhaps you forgot to run "sage -b"?) |
comment:14
That was it. Didn't know about "sage -b". Sorry for the faux pas and thanks for the fix. Working now. |
comment:15
Replying to @nbruin:
It was not an accident. The python_func flag stored in pynac is not a bool any more. It is a bitmask that marks which custom functions are implemented in Python. The rest, if they exist are C++ functions.
This patch doesn't fix the problem. It might actually lead to crashes, since pynac will look for a python function to call for evaluation, differentiation, etc. if some bits in The correct fix will be to get pynac to create a new dummy symbolic function at the point where it raises an error with "unknown function 'f' in archive." Relevant code can be found in |
comment:16
I take it back. This is a good workaround, since constructors of |
Reviewer: Nils Bruin, Burcin Erocal |
comment:18
Pynac 0.2.4 from #12950 fixes this, without the patch attached to this ticket. I don't know how long it will take to get that reviewed and merged, so I'm not opposed to merging this first. |
Merged: sage-5.1.beta1 |
comment:21
Replying to @orlitzky:
Yes, though it is mostly harmless AFAICT. |
comment:22
I've removed it at #13446 (needs review if anyone wants it). |
There is a problem in symbolic function pickling:
The error was not present in Sage 4.7 but it is in newer versions.
It was suggested (http://groups.google.com/group/sage-support/browse_thread/thread/b439844f2fa0b675) that it is related to Pynac.
Pynac was updated to 0.2.2 (sage-4.7.1.alpha1) and then to 0.2.3
(sage-4.7.1.alpha4) according to sage 4.7.1 changelog.
CC: @jpflori @burcin @jasongrout @sagetrac-dsm @orlitzky
Component: symbolics
Keywords: pynac
Author: Michael Orlitzky
Reviewer: Nils Bruin, Burcin Erocal
Merged: sage-5.1.beta1
Issue created by migration from https://trac.sagemath.org/ticket/11919
The text was updated successfully, but these errors were encountered: