Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Lib/_py_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions Lib/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down