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