-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
"maximum recursion depth exceeded " when serializing enum #250
Comments
I can reproduce this in Python 3.7 and 3.8 |
@sam-habitat you mean that in python3.7 and 3.8 you see or do not see the |
Just tried with Python 3.7.5rc1 and dill-0.3.1.1 and got the |
Using
|
Using
|
Hi all, This bug has been opened nearly 2.5 years ago and I am still experiencing it both on MacOs and on Windows with python 3.7.
Note that commenting out Line 2 instead of Line 3 in the code above works, which shows that the standard python's pickle can do the job but not dill. Any progress on solving this bug please? Thanks, |
I can confirm that on Python 3.9 attempting to pickle an enum with dill causes an error. Crucially, python's standard library pickle module works just fine. Could we get this assigned please? It's pretty important that at the very least switching to dill doesn't cause pickle functionality to be lost. |
Fix for this problem is very simple, a custom reducer needs to be defined for enums. Following Pickler would behave exactly like dill default one, but would handle enums correctly:
instead of I would appreciate if this fix could be integrated in-to dill. |
@matthewgdv @kibergus: this is not an easy fix. The |
This does not seem to be closed by #577 |
Yes. That is intended. The support for enums was in the other half of #450. Sorry about the delay in putting out the remaining two/three PRs for enums. I got busy and forgot about it. I will need to reorient myself to the new changes in the repo in the last year and see if they conflict with the changes. I hope to get to it soon. |
Any progress on this? I am using |
After
pip2.7 install enum34 dill
running the following script with python2.7fails with
RuntimeError: maximum recursion depth exceeded while calling a Python object
the same script under python3 works fine.
The text was updated successfully, but these errors were encountered: