Skip to content

Commit 05c81d6

Browse files
Fix tests on 3.7 (#15543)
1 parent 9a4a5aa commit 05c81d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypyc/irbuild/classdef.py

+3
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ def populate_non_ext_bases(builder: IRBuilder, cdef: ClassDef) -> Value:
498498
if builder.options.capi_version < (3, 8):
499499
# TypedDict was added to typing in Python 3.8.
500500
module = "typing_extensions"
501+
# It needs to be "_TypedDict" on typing_extensions 4.7.0+
502+
# and "TypedDict" otherwise.
503+
name = "_TypedDict"
501504
else:
502505
# In Python 3.9 TypedDict is not a real type.
503506
name = "_TypedDict"

0 commit comments

Comments
 (0)