ebea5c41110303523045f46a0f08bd03101b51d5,python/ray/cloudpickle/cloudpickle_fast.py,,_class_getstate,#Any#,144

Before Change


    // For ABCMeta in python3.7+, remove _abc_impl as it is not picklable.
    // This is a fix which breaks the cache but this only makes the first
    // calls to issubclass slower.
    if "_abc_impl" in clsdict:
        (registry, _, _, _) = abc._get_dump(obj)
        clsdict["_abc_impl"] = [subclass_weakref()
                                for subclass_weakref in registry]

After Change


    clsdict = _extract_class_dict(obj)
    clsdict.pop("__weakref__", None)

    if issubclass(type(obj), abc.ABCMeta):
        // If obj is an instance of an ABCMeta subclass, dont pickle the
        // cache/negative caches populated during isinstance/issubclass
        // checks, but pickle the list of registered subclasses of obj.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: ray-project/ray
Commit Name: ebea5c41110303523045f46a0f08bd03101b51d5
Time: 2020-05-29
Author: suquark@gmail.com
File Name: python/ray/cloudpickle/cloudpickle_fast.py
Class Name:
Method Name: _class_getstate


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: ff105d68dad4231df90daafa8aa0b690ae82e06c
Time: 2018-06-29
Author: jasoli@nvidia.com
File Name: run.py
Class Name:
Method Name: main


Project Name: ray-project/ray
Commit Name: f6883bf725caca57bcebcc94aeb93f6a94542984
Time: 2020-03-03
Author: suquark@gmail.com
File Name: python/ray/cloudpickle/cloudpickle_fast.py
Class Name:
Method Name: _class_getstate