@@ -1300,12 +1300,12 @@ try:
13001300except* ValueError:
13011301 y
13021302[out]
1303+ 1:0: error: Exception groups: requires Python 3.11 or newer (current target: Python 3.10)
13031304MypyFile:1(
13041305 TryStmt:1(
13051306 Block:2(
13061307 ExpressionStmt:2(
13071308 NameExpr(x)))
1308- *
13091309 NameExpr(ValueError)
13101310 Block:4(
13111311 ExpressionStmt:4(
@@ -1317,12 +1317,12 @@ try:
13171317except* Exception as e:
13181318 y
13191319[out]
1320+ 1:0: error: Exception groups: requires Python 3.11 or newer (current target: Python 3.10)
13201321MypyFile:1(
13211322 TryStmt:1(
13221323 Block:2(
13231324 ExpressionStmt:2(
13241325 NameExpr(x)))
1325- *
13261326 NameExpr(Exception)
13271327 NameExpr(e)
13281328 Block:4(
@@ -1337,12 +1337,12 @@ except* ValueError:
13371337except* KeyError as e:
13381338 z
13391339[out]
1340+ 1:0: error: Exception groups: requires Python 3.11 or newer (current target: Python 3.10)
13401341MypyFile:1(
13411342 TryStmt:1(
13421343 Block:2(
13431344 ExpressionStmt:2(
13441345 NameExpr(x)))
1345- *
13461346 NameExpr(ValueError)
13471347 Block:4(
13481348 ExpressionStmt:4(
@@ -1363,12 +1363,12 @@ else:
13631363finally:
13641364 w
13651365[out]
1366+ 1:0: error: Exception groups: requires Python 3.11 or newer (current target: Python 3.10)
13661367MypyFile:1(
13671368 TryStmt:1(
13681369 Block:2(
13691370 ExpressionStmt:2(
13701371 NameExpr(x)))
1371- *
13721372 NameExpr(ValueError)
13731373 Block:4(
13741374 ExpressionStmt:4(
@@ -2022,6 +2022,7 @@ MypyFile:1(
20222022def f(*args: *Ts) -> None:
20232023 pass
20242024[out]
2025+ 1:13: error: Star unpack syntax: requires Python 3.11 or newer (current target: Python 3.10)
20252026MypyFile:1(
20262027 FuncDef:1(
20272028 f
@@ -2034,6 +2035,7 @@ MypyFile:1(
20342035[case testUnpackTypeInTuple]
20352036x: tuple[int, *Ts, str]
20362037[out]
2038+ 1:14: error: Star unpack syntax: requires Python 3.11 or newer (current target: Python 3.10)
20372039MypyFile:1(
20382040 AssignmentStmt:1(
20392041 NameExpr(x)
@@ -3190,6 +3192,7 @@ MypyFile:1(
31903192# comment
31913193type A[T] = C[T]
31923194[out]
3195+ 2:0: error: "type" statements: requires Python 3.12 or newer (current target: Python 3.10)
31933196MypyFile:1(
31943197 TypeAliasStmt:2(
31953198 NameExpr(A)
@@ -3209,6 +3212,9 @@ def f[T](): pass
32093212def g[T: str](): pass
32103213def h[T: (int, str)](): pass
32113214[out]
3215+ 3:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
3216+ 4:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
3217+ 5:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
32123218MypyFile:1(
32133219 FuncDef:3(
32143220 f
@@ -3239,6 +3245,8 @@ MypyFile:1(
32393245def f[**P](): pass
32403246class C[T: int, **P]: pass
32413247[out]
3248+ 3:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
3249+ 4:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
32423250MypyFile:1(
32433251 FuncDef:3(
32443252 f
@@ -3261,6 +3269,8 @@ MypyFile:1(
32613269def f[*Ts](): pass
32623270class C[T: int, *Ts]: pass
32633271[out]
3272+ 3:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
3273+ 4:0: error: Improved type parameter syntax: requires Python 3.12 or newer (current target: Python 3.10)
32643274MypyFile:1(
32653275 FuncDef:3(
32663276 f
0 commit comments