-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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 nested names with protocols < 4 #67799
Comments
Proposed patch allows Python implementation of the pickle module to pickle nested names (e.g. methods) with protocols < 4. Pickled data is compatible with old releases. If this is good I'll write C implementation. |
Fixed few bugs and added C implementation. |
Interesting. I have only skimmed through the patch, but +1 on the principle. |
Hum, I don't know well the pickle module. Is it backward compatible? Should Python 2 be able to unserialize data serialized by Python 3? If yes, can you patch break this compatibility? It is unclear to me if it makes sense to even modify protocols different than the latest version. |
Pickle is backward compatible and Python 2 usually is able to unpickle data pickled by Python 3 with protocol < 3. The patch doesn't break compatibility. Current default protocol is 3 for compatibility with older Python 3 versions. It is used in multiprocessing and this is not configurable. |
Oh, it would be nice to switch to version 4 by default, or make it |
bpo-23403. But looks it is early yet for this. Note that this patch doesn't modify protocols. It just makes the pickler more smart and able to serialize more objects with existing protocols. It is the same as add pickle support for some type that didn't support the pickling before. |
New changeset ca12465418bd by Serhiy Storchaka in branch 'default': |
New changeset f78b9f700d45 by Serhiy Storchaka in branch 'default': |
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: