Skip to content

Commit b0d6303

Browse files
committed
fix: cpython/#30926 introduced after __forward_is_class__
python/cpython#30926
1 parent 7a08dde commit b0d6303

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/typing_extensions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4371,7 +4371,11 @@ def _lax_type_check(
43714371
A lax Python 3.11+ like version of typing._type_check
43724372
"""
43734373
if hasattr(typing, "_type_convert"):
4374-
if _FORWARD_REF_HAS_CLASS:
4374+
if (
4375+
sys.version_info >= (3, 10, 3)
4376+
or (3, 9, 10) < sys.version_info[:3] < (3, 10)
4377+
):
4378+
# allow_special_forms introduced later cpython/#30926 (bpo-46539)
43754379
type_ = typing._type_convert(
43764380
value,
43774381
module=module,

0 commit comments

Comments
 (0)