-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Use pickle protocol 4 by default? #67592
Comments
Why not use pickle protocol 4 by default? It allows to pickle some objects which are not pickleable with lower protocols and is more efficient. |
Because pickles will not be compatible with Python < 3.4 anymore. People who want maximum efficiency without compatibility can pass the right protocol manually. |
Multiprocessing uses default protocol and there is no simple (without hacking the stdlib) way to pass the right protocol manually. |
AFAIK, this is so you can interact with processes using another version of Python. |
multiprocessing spawns the other processes itself from the same executable used to launch the main process. It's not subprocess. How would a different version of Python get involved? |
It is possible to have independent processes communicate together, although that's not the most widely-used feature. See: |
Can't we "negociate" the protocol automatically? |
Closing in deference to the enhancement described in bpo-28053. |
Now that Python 3.3 is dead and 3.4 is soon to follow, it's safe to bump DEFAULT_PROTOCOL to 4. |
Should we bump the pickle protocol for shelve? |
Is there something left to be done here? |
Shelve still uses protocol 3 by default. Should it be bumped too? |
That sounds reasonable. Perhaps open a separate issue for it? |
Opened bpo-34204 for shelve. |
Wow. I really wish we did not support this. |
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: