(registry, _, _, _) = abc._get_dump(obj)
clsdict["_abc_impl"] = [subclass_weakref()
for subclass_weakref in registry]
if hasattr(obj, "__slots__"):
// pickle string length optimization: member descriptors of obj are
// created automatically from obj"s __slots__ attribute, no need to
// save them in obj"s state
After Change
clsdict.pop("_abc_negative_cache", None)
clsdict.pop("_abc_negative_cache_version", None)
clsdict.pop("_abc_impl", None)
registry = clsdict.pop("_abc_registry", None)
if registry is None:
// in Python3.7+, the abc caches and registered subclasses of a
// class are bundled into the single _abc_impl attribute
if hasattr(abc, "_get_dump"):