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

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

Closed
ManifoldFR opened this issue Oct 1, 2020 · 0 comments
Closed

Comments

@ManifoldFR
Copy link

ManifoldFR commented Oct 1, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant