Skip to content

Cloudpickle 0.6.0 is broken on python3.4 for local functions #211

Description

@tomMoral

The pickling of local function from a module is broken on python3.4. This seems to be related to #205

The way to reproduce that is having 2 files in the same directory and launching the later command line.

mk_dynamic.py

deff():
defg():
returnsum(range(10))
returng

main.py

frommk_dynamicimportffromcloudpickleimportdumpsprint(dumps(f()))

And then calling the pickled function with the following command line

python -c "from cloudpickle import loads; g = loads($(python main.py)); print(g())"

The given output is

Traceback (mostrecentcalllast):
File"<string>", line1, in<module>File"/home/tom/Work/prog/stackoverflow/bug_cloudpickle_builtins/mk_nobuiltin.py", line5, ingreturnsum(range(10))
KeyError: 'sum'

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