Skip to content

Class tracking in the main process silences potential dynamic classes test failures #313

Description

@pierreglaser

Now that cloudpickle tracks dynamically created classes, pickle_depickle(some_dynamic_class) does not creates a new class anymore, it just returns the one already present in the main process.

As an example if we change the reproducer of #311 by using cloudpickle.loads(cloudpickle.dumps(a)) instead of dumping a pickle in a file and loading it in a fresh python interpreter, we don't get the reported error.

Would we want to be rigorous, we would probably have to test everything involving dynamic class construction in both settings (untracked class depickled for the first time in a child process, tracked class depickled from either a warm child process or the parent process).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions