Skip to content

Fix loading in Python 3.8 of code objects created under Python 3.7 #396

Closed

Description

@ManifoldFR

I discovered that loading code objects created by higher order functions of the form

def make_fun(val):
    def func(_):
        return val
    return func

and pickled using cloudpickle in Python 3.7, can't be loaded back up again with load() in Python 3.8. I think this also affected dill (uqfoundation/dill#357).
A fix is suggested by one of the CPython devs here: python/cpython#12701 (comment)
This would mean making a fallback to pickle.load which is used.
I'm filing this issue so other people can see, this might be an example of why pickling for long term storage is not recommended.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions