Skip to content

Commit 7a6e5c4

Browse files
authored
Upgrade abc.py _py_abc.py to 3.13.5 (#5865)
1 parent 28dff8a commit 7a6e5c4

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Lib/_py_abc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class ABCMeta(type):
3333
_abc_invalidation_counter = 0
3434

3535
def __new__(mcls, name, bases, namespace, /, **kwargs):
36-
# TODO: RUSTPYTHON remove this line (prevents duplicate bases)
37-
bases = tuple(dict.fromkeys(bases))
3836
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
3937
# Compute set of abstract method names
4038
abstracts = {name
@@ -100,8 +98,8 @@ def __instancecheck__(cls, instance):
10098
subtype = type(instance)
10199
if subtype is subclass:
102100
if (cls._abc_negative_cache_version ==
103-
ABCMeta._abc_invalidation_counter and
104-
subclass in cls._abc_negative_cache):
101+
ABCMeta._abc_invalidation_counter and
102+
subclass in cls._abc_negative_cache):
105103
return False
106104
# Fall back to the subclass check.
107105
return cls.__subclasscheck__(subclass)

Lib/abc.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ def my_abstract_property(self):
8585
from _abc import (get_cache_token, _abc_init, _abc_register,
8686
_abc_instancecheck, _abc_subclasscheck, _get_dump,
8787
_reset_registry, _reset_caches)
88-
# TODO: RUSTPYTHON missing _abc module implementation.
89-
except ModuleNotFoundError:
90-
from _py_abc import ABCMeta, get_cache_token
91-
ABCMeta.__module__ = 'abc'
9288
except ImportError:
9389
from _py_abc import ABCMeta, get_cache_token
9490
ABCMeta.__module__ = 'abc'

0 commit comments

Comments
 (0)