Repository navigation
Closed
Labels
3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
Description
| BPO | 23403 |
|---|---|
| Nosy | @pitrou, @vstinner, @avassalotti, @ambv, @serhiy-storchaka, @MojoVampire, @applio |
| PRs | |
| Dependencies |
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:
assignee = 'https://github.com/ambv'
closed_at = <Date 2018-07-24.09:17:14.288>
created_at = <Date 2015-02-06.21:28:18.329>
labels = ['3.8', 'type-feature', 'library']
title = 'Use pickle protocol 4 by default?'
updated_at = <Date 2018-07-24.09:17:14.288>
user = 'https://github.com/serhiy-storchaka'bugs.python.org fields:
activity = <Date 2018-07-24.09:17:14.288>
actor = 'serhiy.storchaka'
assignee = 'lukasz.langa'
closed = True
closed_date = <Date 2018-07-24.09:17:14.288>
closer = 'serhiy.storchaka'
components = ['Library (Lib)']
creation = <Date 2015-02-06.21:28:18.329>
creator = 'serhiy.storchaka'
dependencies = ['33209']
files = []
hgrepos = []
issue_num = 23403
keywords = ['patch', 'patch']
message_count = 15.0
messages = ['235498', '235499', '235501', '235502', '235504', '235507', '251858', '275440', '314841', '314842', '314927', '315075', '315080', '315117', '322282']
nosy_count = 9.0
nosy_names = ['pitrou', 'vstinner', 'alexandre.vassalotti', 'Arfrever', 'lukasz.langa', 'sbt', 'serhiy.storchaka', 'josh.r', 'davin']
pr_nums = ['6355', '6355', '6491']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue23403'
versions = ['Python 3.8']Metadata
Metadata
Assignees
Labels
3.8 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
Activity
serhiy-storchaka commentedon Feb 6, 2015
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.
pitrou commentedon Feb 6, 2015
Because pickles will not be compatible with Python < 3.4 anymore. People who want maximum efficiency without compatibility can pass the right protocol manually.
serhiy-storchaka commentedon Feb 6, 2015
Multiprocessing uses default protocol and there is no simple (without hacking the stdlib) way to pass the right protocol manually.
pitrou commentedon Feb 6, 2015
AFAIK, this is so you can interact with processes using another version of Python.
MojoVampire commentedon Feb 6, 2015
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?
pitrou commentedon Feb 7, 2015
It is possible to have independent processes communicate together, although that's not the most widely-used feature. See:
https://docs.python.org/3/library/multiprocessing.html#multiprocessing-listeners-clients
Also:
https://docs.python.org/3/library/multiprocessing.html#managers
vstinner commentedon Sep 29, 2015
Can't we "negociate" the protocol automatically?
applio commentedon Sep 9, 2016
Closing in deference to the enhancement described in bpo-28053.
ambv commentedon Apr 2, 2018
Now that Python 3.3 is dead and 3.4 is soon to follow, it's safe to bump DEFAULT_PROTOCOL to 4.
serhiy-storchaka commentedon Apr 3, 2018
Should we bump the pickle protocol for shelve?
ambv commentedon Apr 4, 2018
New changeset c51d8c9 by Łukasz Langa in branch 'master':
bpo-23403: Bump pickle.DEFAULT_PROTOCOL to 4 (bpo-6355)
c51d8c9
pitrou commentedon Apr 7, 2018
Is there something left to be done here?
serhiy-storchaka commentedon Apr 8, 2018
Shelve still uses protocol 3 by default. Should it be bumped too?
pitrou commentedon Apr 9, 2018
That sounds reasonable. Perhaps open a separate issue for it?
serhiy-storchaka commentedon Jul 24, 2018
Opened bpo-34204 for shelve.
gpshead commentedon May 14, 2022
Wow. I really wish we did not support this.
multiprocessingwas not intended to be a general purpose RPC mechanism between uncoordinated processes.