Skip to content
Merged
Changes from 2 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
4 changes: 2 additions & 2 deletions cloudpickle/cloudpickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
PY3 = False
PY2 = True
else:
types.ClassType = type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow that's wild! I had never realized that cloudpickle would do that...

from pickle import _Pickler as Pickler
from io import BytesIO as StringIO
string_types = (str,)
Expand Down Expand Up @@ -889,7 +888,8 @@ def save_global(self, obj, name=None, pack=struct.pack):
Pickler.save_global(self, obj, name=name)

dispatch[type] = save_global
dispatch[types.ClassType] = save_global
if PY2:
dispatch[types.ClassType] = save_global

def save_instancemethod(self, obj):
# Memoization rarely is ever useful due to python bounding
Expand Down