Skip to content

Commit c0b9694

Browse files
committed
Patch typing.py to let _py_abc fallback
1 parent 5a2007f commit c0b9694

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)