classification
Title: Use pickle protocol 4 by default?
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: parameterize what serialization is used in multiprocessing
View: 28053
Assigned To: Nosy List: Arfrever, alexandre.vassalotti, davin, haypo, josh.r, pitrou, sbt, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-02-06 21:28 by serhiy.storchaka, last changed 2016-09-09 21:04 by davin. This issue is now closed.

Messages (8)
msg235498 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-06 21:28
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.
msg235499 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-02-06 21:43
Because pickles will not be compatible with Python < 3.4 anymore. People who want maximum efficiency without compatibility can pass the right protocol manually.
msg235501 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-06 22:12
Multiprocessing uses default protocol and there is no simple (without hacking the stdlib) way to pass the right protocol manually.
msg235502 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-02-06 22:19
> Multiprocessing uses default protocol

AFAIK, this is so you can interact with processes using another version of Python.
msg235504 - (view) Author: Josh Rosenberg (josh.r) * Date: 2015-02-06 22:43
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?
msg235507 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-02-07 01:39
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
msg251858 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2015-09-29 13:40
Can't we "negociate" the protocol automatically?
msg275440 - (view) Author: Davin Potts (davin) * (Python committer) Date: 2016-09-09 21:03
Closing in deference to the enhancement described in issue28053.
History
Date User Action Args
2016-09-09 21:04:52davinsetsuperseder: parameterize what serialization is used in multiprocessing
2016-09-09 21:03:32davinsetstatus: open -> closed

nosy: + davin
messages: + msg275440

resolution: duplicate
2015-09-29 13:40:30hayposetnosy: + haypo
messages: + msg251858
2015-02-07 04:15:31Arfreversetnosy: + Arfrever
2015-02-07 01:39:40pitrousetmessages: + msg235507
2015-02-06 22:43:28josh.rsetnosy: + josh.r
messages: + msg235504
2015-02-06 22:19:14pitrousetnosy: + sbt
messages: + msg235502
2015-02-06 22:12:31serhiy.storchakasetmessages: + msg235501
2015-02-06 21:43:51pitrousetmessages: + msg235499
2015-02-06 21:28:18serhiy.storchakacreate