diff --git a/Lib/_py_abc.py b/Lib/_py_abc.py index 4780f9a6199..c870ae9048b 100644 --- a/Lib/_py_abc.py +++ b/Lib/_py_abc.py @@ -33,8 +33,6 @@ class ABCMeta(type): _abc_invalidation_counter = 0 def __new__(mcls, name, bases, namespace, /, **kwargs): - # TODO: RUSTPYTHON remove this line (prevents duplicate bases) - bases = tuple(dict.fromkeys(bases)) cls = super().__new__(mcls, name, bases, namespace, **kwargs) # Compute set of abstract method names abstracts = {name @@ -100,8 +98,8 @@ def __instancecheck__(cls, instance): subtype = type(instance) if subtype is subclass: if (cls._abc_negative_cache_version == - ABCMeta._abc_invalidation_counter and - subclass in cls._abc_negative_cache): + ABCMeta._abc_invalidation_counter and + subclass in cls._abc_negative_cache): return False # Fall back to the subclass check. return cls.__subclasscheck__(subclass) diff --git a/Lib/abc.py b/Lib/abc.py index 1ecff5e2146..f8a4e11ce9c 100644 --- a/Lib/abc.py +++ b/Lib/abc.py @@ -85,10 +85,6 @@ def my_abstract_property(self): from _abc import (get_cache_token, _abc_init, _abc_register, _abc_instancecheck, _abc_subclasscheck, _get_dump, _reset_registry, _reset_caches) -# TODO: RUSTPYTHON missing _abc module implementation. -except ModuleNotFoundError: - from _py_abc import ABCMeta, get_cache_token - ABCMeta.__module__ = 'abc' except ImportError: from _py_abc import ABCMeta, get_cache_token ABCMeta.__module__ = 'abc'