cloudpipe/cloudpickle

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

Open

#313 opened on 2019年10月26日

GitHub で見る
 (0 comments) (1 reaction) (0 assignees)Python (1,407 stars) (152 forks)batch import
help wanted

説明

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).

コントリビューターガイド