We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e21694 commit 519898dCopy full SHA for 519898d
1 file changed
Lib/typing.py
@@ -1860,7 +1860,9 @@ def _allow_reckless_class_checks(depth=2):
1860
The abc and functools modules indiscriminately call isinstance() and
1861
issubclass() on the whole MRO of a user class, which may contain protocols.
1862
"""
1863
- return _caller(depth) in {'abc', 'functools', None}
+ # gh-136047: When `_abc` module is not available, `_py_abc` is required to
1864
+ # allow `_py_abc.ABCMeta` fallback.
1865
+ return _caller(depth) in {'abc', '_py_abc', 'functools', None}
1866
1867
1868
_PROTO_ALLOWLIST = {
0 commit comments