Skip to content
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

Try to use pickle5 when available #3425

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest >= 3.2
prometheus_client >= 0.6.0
jupyter-server-proxy >= 1.1.0
pytest-asyncio
pickle5; python_version >= '3.6' and python_version < '3.8'
7 changes: 5 additions & 2 deletions distributed/protocol/pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@

import cloudpickle

if sys.version_info.major == 2:
import cPickle as pickle
if sys.version_info.major == 3 and sys.version_info.minor < 8:
try:
import pickle5 as pickle
except ImportError:
import pickle
else:
import pickle

Expand Down