Skip to content

Commit 2243804

Browse files
committed
Patch typing.py to let _py_abc fallback
1 parent 466b41f commit 2243804

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/typing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,8 @@ def _allow_reckless_class_checks(depth=2):
19871987
The abc and functools modules indiscriminately call isinstance() and
19881988
issubclass() on the whole MRO of a user class, which may contain protocols.
19891989
"""
1990-
return _caller(depth) in {'abc', 'functools', None}
1990+
# XXX: RUSTPYTHON; https://github.com/python/cpython/pull/136115
1991+
return _caller(depth) in {'abc', '_py_abc', 'functools', None}
19911992

19921993

19931994
_PROTO_ALLOWLIST = {

0 commit comments

Comments
 (0)