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
3.0 pickle docs -- what about old-style classes? #46824
Comments
Can 3.0 unpickle pickled old-style classes? Which pickling methods are |
Python 3.0 shouldn't have any problem unpickling old-style classes. Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
>>> import pickle
>>> class A:
... __slots__ = []
...
>>> pickle.dumps(A())
'(i__main__\nA\np0\n(dp1\nb.'
Python 3.0a3+ (py3k:62050M, Mar 30 2008, 17:29:33)
>>> class A:
... __slots__ = []
...
>>> pickle.loads(b'(i__main__\nA\np0\n(dp1\nb.')
Traceback (most recent call last):
...
TypeError: __class__ assignment: '_EmptyClass' deallocator differs from 'A' |
Alexandre, would you mind fixing up the docs? |
We want to document that old-style classes get converted into new-style |
Sounds like this is the best that we without intimate pickle knowledge |
Recommend that this be closed with no action taken. It is an important Also, the issue is not new in the sense that any cross-version pickling If someone wants to make pickling notes on the Python wiki, that would |
Okay, as the original submitter I withdraw this request. |
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: