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
pickle bug - recursively memoizing class? #40652
Comments
The attached script (picklecycle.py) gives me an I can worm around the problem a couple ways. First, Output (cycle.out) and a modified version of |
Logged In: YES Attaching chatty version of Pickler.memoize() |
Logged In: YES Attaching the output I see when running picklecycle.py w/ the |
Logged In: YES it does memoize recursively, that's how i understand the code if ::
is replaced by :: if id(obj) in self.memo:
return it works (better). and test_pickle.py still passes. |
This bug can be reproduced very easily: import pickle
class MyClass(object):
pass
m = MyClass()
m2 = MyClass()
s = set([m])
m.foo = set([m2])
m2.foo = s
This bug is critical as the pure-python pickle module is required when |
im noticing my test case seems to work fine in py 3.0.1. haven't |
This looks like a duplicate of bpo-1581183. The issue is still present in py3k, but only shows up in picklecycle.py when using pickle.py version. I am attaching picklecycle3.py which is py3k version of picklecycle.py using python pickler. |
There are two issues here. The original issue is a duplicate of bpo-1062277. The other issue is specific to cycles containing a set. [msg77200] I am opening a separate issue for that. See bpo-9269. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: