From 33ac1cefe3a02af37d885307f99875d028c1c892 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 26 Aug 2026 02:31:01 +0200 Subject: [PATCH] Upgrade Zuban to 0.9.2 --- conformance/results/results.html | 54 +++++-------------- .../results/zuban/callables_subtyping.toml | 14 +++-- .../results/zuban/classes_override.toml | 15 +++--- .../results/zuban/constructors_call_init.toml | 2 +- .../results/zuban/enums_expansion.toml | 10 +--- .../generics_mixed_variance_inference.toml | 8 +-- .../zuban/generics_paramspec_variance.toml | 44 +++++---------- .../zuban/generics_typevartuple_variance.toml | 44 +++------------ .../zuban/generics_variance_inference.toml | 11 +--- .../results/zuban/protocols_variance.toml | 8 +-- .../results/zuban/typeddicts_extra_items.toml | 2 +- conformance/results/zuban/version.toml | 2 +- conformance/uv.lock | 26 ++++----- 13 files changed, 68 insertions(+), 172 deletions(-) diff --git a/conformance/results/results.html b/conformance/results/results.html index 1afd3d46e..1aa44316d 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -269,7 +269,7 @@

Python Type System Conformance Test Results

pyrefly 1.3.0-dev.1 pyright 1.1.410 ty 0.0.74 - zuban 0.8.2 + zuban 0.9.2 @@ -617,12 +617,7 @@

Python Type System Conformance Test Results

Unsupported Unsupported Pass - - Partial - - + Pass generics_paramspec_basic @@ -677,7 +672,7 @@

Python Type System Conformance Test Results

  • Does not error when a ParamSpec is used in a position that violates its explicit variance.
  • - Unsupported + Pass generics_scoping @@ -928,7 +923,7 @@

    Python Type System Conformance Test Results

  • Does not error when a TypeVarTuple is used in a position that violates its explicit variance.
  • - Unsupported + Pass generics_upper_bound @@ -972,14 +967,7 @@

    Python Type System Conformance Test Results

    Pass Pass Pass - - Partial - - + Pass @@ -988,7 +976,7 @@

    Python Type System Conformance Test Results

    30 / 33 • 90.9% 28.5 / 33 • 86.4% 30 / 33 • 90.9% - 30 / 33 • 90.9% + 33 / 33 • 100.0% @@ -1116,13 +1104,7 @@

    Python Type System Conformance Test Results

  • the incompatible constructor overrides in ChildC2 are not flagged.
  • - - Partial - - + Pass @@ -1131,7 +1113,7 @@

    Python Type System Conformance Test Results

    2 / 2 • 100.0% 1.5 / 2 • 75.0% 1.5 / 2 • 75.0% - 1.5 / 2 • 75.0% + 2 / 2 • 100.0% @@ -1520,12 +1502,7 @@

    Python Type System Conformance Test Results

    Unsupported - - Partial - - + Pass @@ -1534,7 +1511,7 @@

    Python Type System Conformance Test Results

    10.5 / 11 • 95.5% 10.5 / 11 • 95.5% 6.5 / 11 • 59.1% - 10.5 / 11 • 95.5% + 11 / 11 • 100.0% @@ -2418,12 +2395,7 @@

    Python Type System Conformance Test Results

    Pass - - Partial - - + Pass enums_member_names @@ -2485,7 +2457,7 @@

    Python Type System Conformance Test Results

    6 / 6 • 100.0% 5.5 / 6 • 91.7% 6 / 6 • 100.0% - 5.5 / 6 • 91.7% + 6 / 6 • 100.0% @@ -2721,7 +2693,7 @@

    Python Type System Conformance Test Results

    140.5 / 145 • 96.9% 135.5 / 145 • 93.4% 130.5 / 145 • 90.0% - 140 / 145 • 96.6% + 144.5 / 145 • 99.7% diff --git a/conformance/results/zuban/callables_subtyping.toml b/conformance/results/zuban/callables_subtyping.toml index 81e71c806..221fac6db 100644 --- a/conformance/results/zuban/callables_subtyping.toml +++ b/conformance/results/zuban/callables_subtyping.toml @@ -175,13 +175,19 @@ callables_subtyping.py:243: note: def __call__(self, x: int) -> None callables_subtyping.py:273: error: Incompatible types in assignment (expression has type "Overloaded9", variable has type "FloatArg9") [assignment] callables_subtyping.py:273: note: Following member(s) of "Overloaded9" have conflicts: callables_subtyping.py:273: note: Expected: -callables_subtyping.py:273: note: def __call__(self: FloatArg9, x: float) -> float +callables_subtyping.py:273: note: def __call__(self, x: float) -> float callables_subtyping.py:273: note: Got: -callables_subtyping.py:273: note: def __call__(*args: Any, **kwds: Any) -> Any +callables_subtyping.py:273: note: @overload +callables_subtyping.py:273: note: def __call__(self, x: int) -> int +callables_subtyping.py:273: note: @overload +callables_subtyping.py:273: note: def __call__(self, x: str) -> str callables_subtyping.py:297: error: Incompatible types in assignment (expression has type "StrArg10", variable has type "Overloaded10") [assignment] callables_subtyping.py:297: note: Following member(s) of "StrArg10" have conflicts: callables_subtyping.py:297: note: Expected: -callables_subtyping.py:297: note: def __call__(*args: Any, **kwds: Any) -> Any +callables_subtyping.py:297: note: @overload +callables_subtyping.py:297: note: def __call__(self, x: int, y: str) -> float +callables_subtyping.py:297: note: @overload +callables_subtyping.py:297: note: def __call__(self, x: str) -> complex callables_subtyping.py:297: note: Got: -callables_subtyping.py:297: note: def __call__(self: StrArg10, x: str) -> complex +callables_subtyping.py:297: note: def __call__(self, x: str) -> complex """ diff --git a/conformance/results/zuban/classes_override.toml b/conformance/results/zuban/classes_override.toml index b33df3dd6..781906c90 100644 --- a/conformance/results/zuban/classes_override.toml +++ b/conformance/results/zuban/classes_override.toml @@ -1,12 +1,5 @@ -conformant = "Partial" -notes = """ -Does not honor `@override` compatibility checks for `__init__` and `__new__`: -the incompatible constructor overrides in `ChildC2` are not flagged. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Lines 134, 135: Expected error (tag 'init') -Lines 137, 138: Expected error (tag 'new') """ output = """ classes_override.py:53: error: Method "method3" is marked as an override, but no base method was found with this name [misc] @@ -14,4 +7,10 @@ classes_override.py:56: error: Method "method4" is marked as an override, but no classes_override.py:79: error: Method "static_method1" is marked as an override, but no base method was found with this name [misc] classes_override.py:84: error: Method "class_method1" is marked as an override, but no base method was found with this name [misc] classes_override.py:89: error: Method "property1" is marked as an override, but no base method was found with this name [misc] +classes_override.py:135: error: Argument 1 of "__init__" is incompatible with supertype "ParentC"; supertype defines the argument type as "int" [override] +classes_override.py:135: note: This violates the Liskov substitution principle +classes_override.py:135: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides +classes_override.py:138: error: Argument 1 of "__new__" is incompatible with supertype "ParentC"; supertype defines the argument type as "int" [override] +classes_override.py:138: note: This violates the Liskov substitution principle +classes_override.py:138: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides """ diff --git a/conformance/results/zuban/constructors_call_init.toml b/conformance/results/zuban/constructors_call_init.toml index 3ebf04786..6192d7a0d 100644 --- a/conformance/results/zuban/constructors_call_init.toml +++ b/conformance/results/zuban/constructors_call_init.toml @@ -3,7 +3,7 @@ errors_diff = """ """ output = """ constructors_call_init.py:21: error: Argument 1 to "Class1" has incompatible type "float"; expected "int" [arg-type] -constructors_call_init.py:42: error: Argument 1 to "Class3" has incompatible type "Class2[Any]"; expected "Self | None" [arg-type] +constructors_call_init.py:42: error: Argument 1 to "Class3" has incompatible type "Class2[int]"; expected "Self | None" [arg-type] constructors_call_init.py:56: error: Invalid self type in __init__ [call-arg] constructors_call_init.py:107: error: The type of self "T1" has type vars in non standard positions for class "Class8" [misc] constructors_call_init.py:107: error: The type of self "T2" has type vars in non standard positions for class "Class8" [misc] diff --git a/conformance/results/zuban/enums_expansion.toml b/conformance/results/zuban/enums_expansion.toml index 99ac1e7f1..5e05ae77b 100644 --- a/conformance/results/zuban/enums_expansion.toml +++ b/conformance/results/zuban/enums_expansion.toml @@ -1,15 +1,7 @@ -conformant = "Partial" -notes = """ -Does not treat a complete union of all literal members as equivalent to the enum type. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 85: Unexpected errors ['enums_expansion.py:85: error: Incompatible types in assignment (expression has type "Answer", variable has type "Literal[Answer.Yes, Answer.No]") [assignment]'] -Line 86: Unexpected errors ['enums_expansion.py:86: error: Expression is of type "Answer", not "Literal[Answer.Yes, Answer.No]" [misc]'] """ output = """ enums_expansion.py:38: error: Statement is unreachable [unreachable] enums_expansion.py:56: error: Expression is of type "CustomFlags", not "Literal[CustomFlags.FLAG3]" [misc] -enums_expansion.py:85: error: Incompatible types in assignment (expression has type "Answer", variable has type "Literal[Answer.Yes, Answer.No]") [assignment] -enums_expansion.py:86: error: Expression is of type "Answer", not "Literal[Answer.Yes, Answer.No]" [misc] """ diff --git a/conformance/results/zuban/generics_mixed_variance_inference.toml b/conformance/results/zuban/generics_mixed_variance_inference.toml index 7e3422c42..bd9c4a3d8 100644 --- a/conformance/results/zuban/generics_mixed_variance_inference.toml +++ b/conformance/results/zuban/generics_mixed_variance_inference.toml @@ -1,14 +1,8 @@ -conformant = "Partial" -notes = """ -Does not infer covariance for a TypeVarTuple in a class with mixed type parameters. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 17: Unexpected errors ['generics_mixed_variance_inference.py:17: error: Incompatible types in assignment (expression has type "Mixed[int, bool, []]", variable has type "Mixed[int, int, []]") [assignment]'] """ output = """ generics_mixed_variance_inference.py:13: error: Incompatible types in assignment (expression has type "Mixed[bool, []]", variable has type "Mixed[int, []]") [assignment] generics_mixed_variance_inference.py:16: error: Incompatible types in assignment (expression has type "Mixed[int, object, []]", variable has type "Mixed[int, int, []]") [assignment] -generics_mixed_variance_inference.py:17: error: Incompatible types in assignment (expression has type "Mixed[int, bool, []]", variable has type "Mixed[int, int, []]") [assignment] generics_mixed_variance_inference.py:21: error: Incompatible types in assignment (expression has type "Mixed[int, [bool]]", variable has type "Mixed[int, [int]]") [assignment] """ diff --git a/conformance/results/zuban/generics_paramspec_variance.toml b/conformance/results/zuban/generics_paramspec_variance.toml index 9cf305fb1..0b4029a1c 100644 --- a/conformance/results/zuban/generics_paramspec_variance.toml +++ b/conformance/results/zuban/generics_paramspec_variance.toml @@ -1,47 +1,27 @@ -conformant = "Unsupported" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 15: Expected 1 errors -Line 30: Expected 1 errors -Line 90: Expected 1 errors -Line 111: Expected 1 errors -Line 117: Expected 1 errors -Line 126: Expected 1 errors -Line 132: Expected 1 errors -Line 151: Expected 1 errors -Line 31: Unexpected errors ['generics_paramspec_variance.py:31: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment]'] -Line 84: Unexpected errors ['generics_paramspec_variance.py:84: error: Incompatible types in assignment (expression has type "OutitP[[*, a: int]]", variable has type "OutitP[[a: int]]") [assignment]'] -Line 86: Unexpected errors ['generics_paramspec_variance.py:86: error: Incompatible types in assignment (expression has type "OutitP[[int]]", variable has type "OutitP[[a: int]]") [assignment]'] -Line 97: Unexpected errors ['generics_paramspec_variance.py:97: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]'] -Line 98: Unexpected errors ['generics_paramspec_variance.py:98: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]'] -Line 99: Unexpected errors ['generics_paramspec_variance.py:99: error: Unexpected argument to "ParamSpec()" [misc]'] -Line 133: Unexpected errors ['generics_paramspec_variance.py:133: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment]'] -Line 152: Unexpected errors ['generics_paramspec_variance.py:152: error: Incompatible types in assignment (expression has type "InferredCovariantParamSpecOld[[int]]", variable has type "InferredCovariantParamSpecOld[[object]]") [assignment]'] """ output = """ generics_paramspec_variance.py:14: error: Incompatible types in assignment (expression has type "InvariantParamSpec[[int]]", variable has type "InvariantParamSpec[[object]]") [assignment] +generics_paramspec_variance.py:15: error: Incompatible types in assignment (expression has type "InvariantParamSpec[[object]]", variable has type "InvariantParamSpec[[int]]") [assignment] generics_paramspec_variance.py:21: error: Incompatible types in assignment (expression has type "ContravariantParamSpec[[int]]", variable has type "ContravariantParamSpec[[object]]") [assignment] -generics_paramspec_variance.py:31: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[int]]", variable has type "CovariantParamSpec[[object]]") [assignment] +generics_paramspec_variance.py:30: error: Incompatible types in assignment (expression has type "CovariantParamSpec[[object]]", variable has type "CovariantParamSpec[[int]]") [assignment] generics_paramspec_variance.py:61: error: Incompatible types in assignment (expression has type "InitP[[*, a: int]]", variable has type "InitP[[a: int]]") [assignment] generics_paramspec_variance.py:63: error: Incompatible types in assignment (expression has type "InitP[[int]]", variable has type "InitP[[a: int]]") [assignment] generics_paramspec_variance.py:65: error: Incompatible types in assignment (expression has type "InitP[[b: int]]", variable has type "InitP[[a: int]]") [assignment] generics_paramspec_variance.py:69: error: Incompatible types in assignment (expression has type "InitP[[a: int, b: str]]", variable has type "InitP[[a: int]]") [assignment] -generics_paramspec_variance.py:84: error: Incompatible types in assignment (expression has type "OutitP[[*, a: int]]", variable has type "OutitP[[a: int]]") [assignment] -generics_paramspec_variance.py:86: error: Incompatible types in assignment (expression has type "OutitP[[int]]", variable has type "OutitP[[a: int]]") [assignment] generics_paramspec_variance.py:88: error: Incompatible types in assignment (expression has type "OutitP[[b: int]]", variable has type "OutitP[[a: int]]") [assignment] +generics_paramspec_variance.py:90: error: Incompatible types in assignment (expression has type "OutitP[[a: int =]]", variable has type "OutitP[[a: int]]") [assignment] generics_paramspec_variance.py:92: error: Incompatible types in assignment (expression has type "OutitP[[a: int, b: str]]", variable has type "OutitP[[a: int]]") [assignment] -generics_paramspec_variance.py:97: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] -generics_paramspec_variance.py:98: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] -generics_paramspec_variance.py:99: error: Unexpected argument to "ParamSpec()" [misc] -generics_paramspec_variance.py:100: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] -generics_paramspec_variance.py:100: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] -generics_paramspec_variance.py:101: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] -generics_paramspec_variance.py:101: error: Unexpected argument to "ParamSpec()" [misc] -generics_paramspec_variance.py:102: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] -generics_paramspec_variance.py:102: error: Unexpected argument to "ParamSpec()" [misc] +generics_paramspec_variance.py:100: error: ParamSpec cannot be both covariant and contravariant [misc] +generics_paramspec_variance.py:101: error: Cannot use covariant with infer_variance [misc] +generics_paramspec_variance.py:102: error: Cannot use contravariant with infer_variance [misc] generics_paramspec_variance.py:110: error: Incompatible types in assignment (expression has type "InvariantParamSpecOld[[bool]]", variable has type "InvariantParamSpecOld[[int]]") [assignment] +generics_paramspec_variance.py:111: error: Incompatible types in assignment (expression has type "InvariantParamSpecOld[[object]]", variable has type "InvariantParamSpecOld[[int]]") [assignment] +generics_paramspec_variance.py:117: error: Cannot use a contravariant param spec as a parameter [type-var] generics_paramspec_variance.py:121: error: Incompatible types in assignment (expression has type "ContravariantParamSpecOld[[int]]", variable has type "ContravariantParamSpecOld[[object]]") [assignment] -generics_paramspec_variance.py:133: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[int]]", variable has type "CovariantParamSpecOld[[object]]") [assignment] +generics_paramspec_variance.py:126: error: Cannot use a covariant param spec as return type [type-var] +generics_paramspec_variance.py:132: error: Incompatible types in assignment (expression has type "CovariantParamSpecOld[[object]]", variable has type "CovariantParamSpecOld[[int]]") [assignment] generics_paramspec_variance.py:142: error: Incompatible types in assignment (expression has type "InferredContravariantParamSpecOld[[int]]", variable has type "InferredContravariantParamSpecOld[[object]]") [assignment] -generics_paramspec_variance.py:152: error: Incompatible types in assignment (expression has type "InferredCovariantParamSpecOld[[int]]", variable has type "InferredCovariantParamSpecOld[[object]]") [assignment] +generics_paramspec_variance.py:151: error: Incompatible types in assignment (expression has type "InferredCovariantParamSpecOld[[object]]", variable has type "InferredCovariantParamSpecOld[[int]]") [assignment] """ diff --git a/conformance/results/zuban/generics_typevartuple_variance.toml b/conformance/results/zuban/generics_typevartuple_variance.toml index c4092867e..5c9e528d5 100644 --- a/conformance/results/zuban/generics_typevartuple_variance.toml +++ b/conformance/results/zuban/generics_typevartuple_variance.toml @@ -1,22 +1,5 @@ -conformant = "Unsupported" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 79: Expected 1 errors -Line 90: Expected 1 errors -Line 29: Unexpected errors ['generics_typevartuple_variance.py:29: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment]'] -Line 30: Unexpected errors ['generics_typevartuple_variance.py:30: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[Unpack[Tuple[object, ...]]]", variable has type "ContravariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment]'] -Line 33: Unexpected errors ['generics_typevartuple_variance.py:33: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "ContravariantTypeVarTuple[int]") [assignment]'] -Line 43: Unexpected errors ['generics_typevartuple_variance.py:43: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int]", variable has type "CovariantTypeVarTuple[object]") [assignment]'] -Line 44: Unexpected errors ['generics_typevartuple_variance.py:44: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[bool, bool]", variable has type "CovariantTypeVarTuple[int, int]") [assignment]'] -Line 49: Unexpected errors ['generics_typevartuple_variance.py:49: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "CovariantTypeVarTuple[Unpack[Tuple[object, ...]]]") [assignment]'] -Line 52: Unexpected errors ['generics_typevartuple_variance.py:52: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int]", variable has type "CovariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment]'] -Line 55: Unexpected errors ['generics_typevartuple_variance.py:55: error: Unexpected keyword argument "infer_variance" for "TypeVarTuple" [call-arg]'] -Line 73: Unexpected errors ['generics_typevartuple_variance.py:73: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [call-arg]'] -Line 84: Unexpected errors ['generics_typevartuple_variance.py:84: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment]'] -Line 87: Unexpected errors ['generics_typevartuple_variance.py:87: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [call-arg]'] -Line 98: Unexpected errors ['generics_typevartuple_variance.py:98: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[int]", variable has type "CovariantTypeVarTupleOld[object]") [assignment]'] -Line 108: Unexpected errors ['generics_typevartuple_variance.py:108: error: Incompatible types in assignment (expression has type "InferredContravariantTypeVarTupleOld[object]", variable has type "InferredContravariantTypeVarTupleOld[int]") [assignment]'] -Line 117: Unexpected errors ['generics_typevartuple_variance.py:117: error: Incompatible types in assignment (expression has type "InferredCovariantTypeVarTupleOld[int]", variable has type "InferredCovariantTypeVarTupleOld[object]") [assignment]'] """ output = """ generics_typevartuple_variance.py:14: error: Incompatible types in assignment (expression has type "InvariantTypeVarTuple[int]", variable has type "InvariantTypeVarTuple[object]") [assignment] @@ -26,38 +9,23 @@ generics_typevartuple_variance.py:18: error: Incompatible types in assignment (e generics_typevartuple_variance.py:20: error: Incompatible types in assignment (expression has type "InvariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "InvariantTypeVarTuple[int]") [assignment] generics_typevartuple_variance.py:21: error: Incompatible types in assignment (expression has type "InvariantTypeVarTuple[int]", variable has type "InvariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment] generics_typevartuple_variance.py:28: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object, int]", variable has type "ContravariantTypeVarTuple[object, object]") [assignment] -generics_typevartuple_variance.py:29: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[object]", variable has type "ContravariantTypeVarTuple[int]") [assignment] -generics_typevartuple_variance.py:30: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[Unpack[Tuple[object, ...]]]", variable has type "ContravariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment] generics_typevartuple_variance.py:31: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "ContravariantTypeVarTuple[Unpack[Tuple[object, ...]]]") [assignment] -generics_typevartuple_variance.py:33: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "ContravariantTypeVarTuple[int]") [assignment] generics_typevartuple_variance.py:34: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTuple[int]", variable has type "ContravariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment] generics_typevartuple_variance.py:42: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object]", variable has type "CovariantTypeVarTuple[int]") [assignment] -generics_typevartuple_variance.py:43: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int]", variable has type "CovariantTypeVarTuple[object]") [assignment] -generics_typevartuple_variance.py:44: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[bool, bool]", variable has type "CovariantTypeVarTuple[int, int]") [assignment] generics_typevartuple_variance.py:45: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[bool, object]", variable has type "CovariantTypeVarTuple[int, int]") [assignment] generics_typevartuple_variance.py:46: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object, bool]", variable has type "CovariantTypeVarTuple[int, int]") [assignment] generics_typevartuple_variance.py:47: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[object, object]", variable has type "CovariantTypeVarTuple[int, int]") [assignment] generics_typevartuple_variance.py:48: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[Unpack[Tuple[object, ...]]]", variable has type "CovariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment] -generics_typevartuple_variance.py:49: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "CovariantTypeVarTuple[Unpack[Tuple[object, ...]]]") [assignment] generics_typevartuple_variance.py:51: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[Unpack[Tuple[int, ...]]]", variable has type "CovariantTypeVarTuple[int]") [assignment] -generics_typevartuple_variance.py:52: error: Incompatible types in assignment (expression has type "CovariantTypeVarTuple[int]", variable has type "CovariantTypeVarTuple[Unpack[Tuple[int, ...]]]") [assignment] -generics_typevartuple_variance.py:55: error: Unexpected keyword argument "infer_variance" for "TypeVarTuple" [call-arg] -generics_typevartuple_variance.py:56: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [call-arg] -generics_typevartuple_variance.py:56: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [call-arg] -generics_typevartuple_variance.py:57: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [call-arg] -generics_typevartuple_variance.py:57: error: Unexpected keyword argument "infer_variance" for "TypeVarTuple" [call-arg] -generics_typevartuple_variance.py:58: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [call-arg] -generics_typevartuple_variance.py:58: error: Unexpected keyword argument "infer_variance" for "TypeVarTuple" [call-arg] +generics_typevartuple_variance.py:56: error: TypeVarTuple cannot be both covariant and contravariant [misc] +generics_typevartuple_variance.py:57: error: Cannot use covariant with infer_variance [misc] +generics_typevartuple_variance.py:58: error: Cannot use contravariant with infer_variance [misc] generics_typevartuple_variance.py:68: error: Incompatible types in assignment (expression has type "InvariantTypeVarTupleOld[int]", variable has type "InvariantTypeVarTupleOld[object]") [assignment] generics_typevartuple_variance.py:69: error: Incompatible types in assignment (expression has type "InvariantTypeVarTupleOld[object]", variable has type "InvariantTypeVarTupleOld[int]") [assignment] -generics_typevartuple_variance.py:73: error: Unexpected keyword argument "contravariant" for "TypeVarTuple" [call-arg] +generics_typevartuple_variance.py:79: error: Cannot use a contravariant type var tuples as return type [type-var] generics_typevartuple_variance.py:83: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[int]", variable has type "ContravariantTypeVarTupleOld[object]") [assignment] -generics_typevartuple_variance.py:84: error: Incompatible types in assignment (expression has type "ContravariantTypeVarTupleOld[object]", variable has type "ContravariantTypeVarTupleOld[int]") [assignment] -generics_typevartuple_variance.py:87: error: Unexpected keyword argument "covariant" for "TypeVarTuple" [call-arg] +generics_typevartuple_variance.py:90: error: Cannot use a covariant type var tuples as a parameter [type-var] generics_typevartuple_variance.py:97: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[object]", variable has type "CovariantTypeVarTupleOld[int]") [assignment] -generics_typevartuple_variance.py:98: error: Incompatible types in assignment (expression has type "CovariantTypeVarTupleOld[int]", variable has type "CovariantTypeVarTupleOld[object]") [assignment] generics_typevartuple_variance.py:107: error: Incompatible types in assignment (expression has type "InferredContravariantTypeVarTupleOld[int]", variable has type "InferredContravariantTypeVarTupleOld[object]") [assignment] -generics_typevartuple_variance.py:108: error: Incompatible types in assignment (expression has type "InferredContravariantTypeVarTupleOld[object]", variable has type "InferredContravariantTypeVarTupleOld[int]") [assignment] generics_typevartuple_variance.py:116: error: Incompatible types in assignment (expression has type "InferredCovariantTypeVarTupleOld[object]", variable has type "InferredCovariantTypeVarTupleOld[int]") [assignment] -generics_typevartuple_variance.py:117: error: Incompatible types in assignment (expression has type "InferredCovariantTypeVarTupleOld[int]", variable has type "InferredCovariantTypeVarTupleOld[object]") [assignment] """ diff --git a/conformance/results/zuban/generics_variance_inference.toml b/conformance/results/zuban/generics_variance_inference.toml index 7e9a0604a..600ad7145 100644 --- a/conformance/results/zuban/generics_variance_inference.toml +++ b/conformance/results/zuban/generics_variance_inference.toml @@ -1,12 +1,5 @@ -conformant = "Partial" -notes = """ -polymorphic functions with bound self type influence variance inference, -which is not part of the variance inference algorithm as described in the spec. -See gh-2281 for details. -""" -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 200: Unexpected errors ['generics_variance_inference.py:200: error: Name "S" is not defined [name-defined]', 'generics_variance_inference.py:200: error: Name "S" is not defined [name-defined]'] """ output = """ generics_variance_inference.py:24: error: Incompatible types in assignment (expression has type "ClassA[float, int, int]", variable has type "ClassA[int, int, int]") [assignment] @@ -32,7 +25,5 @@ generics_variance_inference.py:169: error: Incompatible types in assignment (exp generics_variance_inference.py:170: error: Incompatible types in assignment (expression has type "ShouldBeInvariant6[int]", variable has type "ShouldBeInvariant6[float]") [assignment] generics_variance_inference.py:181: error: Incompatible types in assignment (expression has type "ShouldBeCovariant6[float]", variable has type "ShouldBeCovariant6[int]") [assignment] generics_variance_inference.py:194: error: Incompatible types in assignment (expression has type "ShouldBeContravariant2[int]", variable has type "ShouldBeContravariant2[float]") [assignment] -generics_variance_inference.py:200: error: Name "S" is not defined [name-defined] -generics_variance_inference.py:200: error: Name "S" is not defined [name-defined] generics_variance_inference.py:205: error: Incompatible types in assignment (expression has type "ShouldBeCovariant7[object]", variable has type "ShouldBeCovariant7[int]") [assignment] """ diff --git a/conformance/results/zuban/protocols_variance.toml b/conformance/results/zuban/protocols_variance.toml index 5aac24487..187f0d716 100644 --- a/conformance/results/zuban/protocols_variance.toml +++ b/conformance/results/zuban/protocols_variance.toml @@ -1,13 +1,7 @@ -conformant = "Partial" -conformance_automated = "Fail" -notes = """ -False report of ParamSpec variance keywords. -""" +conformance_automated = "Pass" errors_diff = """ -Line 15: Unexpected errors ['protocols_variance.py:15: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc]'] """ output = """ -protocols_variance.py:15: error: The variance and bound arguments to ParamSpec do not have defined semantics yet [misc] protocols_variance.py:22: error: Invariant type variable "T1" used in protocol where Covariant one is expected [misc] protocols_variance.py:41: error: Invariant type variable "T3" used in protocol where Contravariant one is expected [misc] protocols_variance.py:57: error: Invariant type variable "T1" used in protocol where Contravariant one is expected [misc] diff --git a/conformance/results/zuban/typeddicts_extra_items.toml b/conformance/results/zuban/typeddicts_extra_items.toml index 82f60b5fd..82d257007 100644 --- a/conformance/results/zuban/typeddicts_extra_items.toml +++ b/conformance/results/zuban/typeddicts_extra_items.toml @@ -27,7 +27,7 @@ typeddicts_extra_items.py:257: error: Incompatible types in assignment (expressi typeddicts_extra_items.py:268: error: Incompatible types in assignment (expression has type "MovieNotClosed", variable has type "MovieExtraInt") [assignment] typeddicts_extra_items.py:278: error: Extra key "year" for TypedDict "NonClosedMovie" [typeddict-unknown-key] typeddicts_extra_items.py:285: error: Incompatible types (expression has type "str", TypedDict item "language" has type "int") [typeddict-item] -typeddicts_extra_items.py:293: error: Incompatible types (expression has type "int", TypedDict item "year" has type "Never") [typeddict-item] +typeddicts_extra_items.py:293: error: Extra key "year" for TypedDict "ClosedMovie" [typeddict-unknown-key] typeddicts_extra_items.py:303: error: Incompatible types in assignment (expression has type "MovieExtraInt", variable has type "Mapping[str, int]") [assignment] typeddicts_extra_items.py:352: error: Incompatible types in assignment (expression has type "dict[str, int]", variable has type "IntDict") [assignment] """ diff --git a/conformance/results/zuban/version.toml b/conformance/results/zuban/version.toml index bff04a65e..f1f3f54a9 100644 --- a/conformance/results/zuban/version.toml +++ b/conformance/results/zuban/version.toml @@ -1 +1 @@ -version = "zuban 0.8.2" +version = "zuban 0.9.2" diff --git a/conformance/uv.lock b/conformance/uv.lock index 5da6097af..2b3c979e4 100644 --- a/conformance/uv.lock +++ b/conformance/uv.lock @@ -291,19 +291,19 @@ wheels = [ [[package]] name = "zuban" -version = "0.8.2" +version = "0.9.2" source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://files.pythonhosted.org/packages/95/d8/9a24dc2c22250fc416bff06c4ac4664c73ef7ec558b8d23049f493af73b5/zuban-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:07d3a498c514cb51ec881987b0e841043ea466674a9b3bed8411890bacb4d0e3", size = 11486917, upload-time = "2026-06-08T23:29:02.829Z" }, - { url = "https://files.pythonhosted.org/packages/23/62/3636a5474a9f9361ca83030cb82fefb4b1ff7771c75ab957c9025a3a7a97/zuban-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:64ed57aea375c74671d81e4d4655328a47b2157c7827e2c50cc90f80b29e8417", size = 11205360, upload-time = "2026-06-08T23:29:05.612Z" }, - { url = "https://files.pythonhosted.org/packages/49/41/0650f89e1f2ea0e865dd5e23614e6f3a205153032f0a9e970c5f4da885d1/zuban-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8bc47f343a939407ff881b0e9f0da36c7a3a509b3e6ca237512aadf30d02053b", size = 28385720, upload-time = "2026-06-08T23:29:08.177Z" }, - { url = "https://files.pythonhosted.org/packages/d7/52/58ecbdbf9668fd81c85f69b94609a5a813a94a18d9ce73ee1548cf85d98d/zuban-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:26ede2418f48affde0e9092108ec0be344b1323d7e87d11ecac8e5e89d383d7e", size = 28603725, upload-time = "2026-06-08T23:29:11.778Z" }, - { url = "https://files.pythonhosted.org/packages/96/ad/efc2e98a4492d010459161e03f98952227744c8f5ae8ebcc13ca88d50ad6/zuban-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b83e0cc35cccb2f60b50d8c6658ca3ac332914ad58d8e3d3d5886a13f761771b", size = 29769216, upload-time = "2026-06-08T23:29:14.865Z" }, - { url = "https://files.pythonhosted.org/packages/f7/60/a40add4cf31694f64727a34fc4a2093c599f1c911fdb6fbf61bf40d437f5/zuban-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c4b26c1a383234c340d4956c04d8528e5e1654a08571d9d3eaced4973d21f87", size = 30851896, upload-time = "2026-06-08T23:29:18.04Z" }, - { url = "https://files.pythonhosted.org/packages/17/6f/7e32ec7c1677dfd7ac5821ac1d6cc6d4552f65fe06b098bd3515f5c5699d/zuban-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:32699e64acdb7d8984eddc3095b8f6fcf37fa00c52d54e74fed920440fe36ebe", size = 28551589, upload-time = "2026-06-08T23:29:20.922Z" }, - { url = "https://files.pythonhosted.org/packages/68/26/f5e8434aa8ea478a949b4dab8bd94abb47ff46f4777943a3309c33bfda94/zuban-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f2ada854ceddeae6f7a8ecf709577235f5845770ebd6d51b26dde4358e78b645", size = 29007499, upload-time = "2026-06-08T23:29:23.954Z" }, - { url = "https://files.pythonhosted.org/packages/5c/37/70e6696e0e9d202fa84be8437b9dbf32e6d5854d9a201b9ca24965496391/zuban-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:dd6c2be104e6e9e1693e15d0a7775c5841a9793534351738c24b7377c58b487c", size = 29670474, upload-time = "2026-06-08T23:29:26.769Z" }, - { url = "https://files.pythonhosted.org/packages/74/0c/1c6f0a239fc2c93c46e733fa5d6f9ac376f9e0aec909467d50f6071234bf/zuban-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:299debc250b729abb0ebecd0bd53cac3c6b26cdb32dc4e79e601f9a1f584d3cd", size = 29029010, upload-time = "2026-06-08T23:29:29.959Z" }, - { url = "https://files.pythonhosted.org/packages/a6/7b/d5cdb140e9979d3f7784d9565f21692cafb851cceb21cba13348bcfcfa30/zuban-0.8.2-py3-none-win32.whl", hash = "sha256:3521196b132c2650e01a085d211dfcd849de9e9409e193e8f8ad85629c60fa42", size = 10026570, upload-time = "2026-06-08T23:29:32.596Z" }, - { url = "https://files.pythonhosted.org/packages/ee/cb/25a952a3594aa7ee32dee648513a1ea758c2def98742966d24484bb3d8ab/zuban-0.8.2-py3-none-win_amd64.whl", hash = "sha256:07463d337d293efb918990900c52b976646810b8f741999e8f288fb3da6e6594", size = 10798493, upload-time = "2026-06-08T23:29:34.805Z" }, + { url = "https://files.pythonhosted.org/packages/a4/c0/1c395a08b2a7c48fbbb1398818d65813032ad0acfec5a841db0e7142a6ac/zuban-0.9.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:8922df80834c2d5cb1e2798192dc85d40b4dc3fa3149e7b2b89dccf3cdc110d8", size = 11377755, upload-time = "2026-08-26T00:19:21.022Z" }, + { url = "https://files.pythonhosted.org/packages/af/3c/b323802de4a86f71479b85d388294380205006362bca4414d3213469136a/zuban-0.9.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:112c9bd639ec417fe7881a7d99bc34e35ac6ba6e0afd4f33caf0774ea8ae84fc", size = 11101402, upload-time = "2026-08-26T00:19:24.548Z" }, + { url = "https://files.pythonhosted.org/packages/9f/3b/71ee867aebe9175de1db0208c2eeee7f294821545e6140c28e5ed9f21888/zuban-0.9.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8d65dafe086a8e73cbb8e6d7e3b234a7d2e64cf794d49c5ca0ca901a2880bea", size = 28451467, upload-time = "2026-08-26T00:19:28.898Z" }, + { url = "https://files.pythonhosted.org/packages/bc/93/7331f9f096b1c4a9d575ed6e86572cf6c5ac9eab5dc1c68d0d875e78d549/zuban-0.9.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d8431a65ac7815af24e015d6f6c935518625e015e028b061899677a3d43c6349", size = 28687477, upload-time = "2026-08-26T00:19:33.102Z" }, + { url = "https://files.pythonhosted.org/packages/f8/5a/de09de19a0ea8a4593632631c905751cf380cf8a92d1607632ad40c683ea/zuban-0.9.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6d271a27a56ad89e3bb5942580aa903354c3861bfab29e5c655d44007d1d15a2", size = 29736764, upload-time = "2026-08-26T00:19:38.73Z" }, + { url = "https://files.pythonhosted.org/packages/cb/71/2e32dfafa5ac302b7b9cc48bbcfbc9da6bca221ccfd03da5b9d2a28240ee/zuban-0.9.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20a467e9d90f5dce53be3c760d9b65e768870a4e940a5256985f67155587eeb9", size = 31719649, upload-time = "2026-08-26T00:19:43.454Z" }, + { url = "https://files.pythonhosted.org/packages/b2/24/d437b54a088b2a35df948841d011a011ba5db59bdb4bad7c800dffcbbe2e/zuban-0.9.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a2c29e501de2f39690eadffab6369c9ac949bdab82aaab4c9fcbbfda0794d704", size = 28630746, upload-time = "2026-08-26T00:19:47.888Z" }, + { url = "https://files.pythonhosted.org/packages/04/12/a132d0ad526d8986475344546b22acfea0bd6856bb293b70e691fa9bf5d5/zuban-0.9.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:23e34cd5d3c2aad476506fc2a0d3f4fd314e87bb03c873ec2c319497b06f16df", size = 29122179, upload-time = "2026-08-26T00:19:52.937Z" }, + { url = "https://files.pythonhosted.org/packages/70/4e/ebbec923b02c69eee955cc65d227c4a1b6f5c6f2b509b92c9df02ad67e2b/zuban-0.9.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:40f4737d3f7c5926b986ebb4cb44767b2b72788072e833c49d2d3ad2f69ecbdb", size = 29624765, upload-time = "2026-08-26T00:19:57.778Z" }, + { url = "https://files.pythonhosted.org/packages/db/7f/8baa60499029d57bc0dbc254d75469f7b7860654671d0bf3683bc6c56f05/zuban-0.9.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:26a83d3c1f12cd131774a4f89b3c0d750619e7035d02dcd4f668fb43e5ba2fea", size = 28964675, upload-time = "2026-08-26T00:20:02.558Z" }, + { url = "https://files.pythonhosted.org/packages/fa/d8/4a6f29958fa962c2b12ec32a0624708b9da93bec236ace0ac993632d05b1/zuban-0.9.2-py3-none-win32.whl", hash = "sha256:59d09caf2e488eb6d31a3bead1699349f66dafbfd595eb64bcd8e11b79d8e2d1", size = 10051150, upload-time = "2026-08-26T00:20:05.965Z" }, + { url = "https://files.pythonhosted.org/packages/af/c2/123e0f3054f688039290766fdbdd4cba96834537e6fd3f6c95ae460858bd/zuban-0.9.2-py3-none-win_amd64.whl", hash = "sha256:9bc429ef78d3f21a6aeec9cddffe8748235ef2374ef318a91f4aa089cafba75c", size = 10730401, upload-time = "2026-08-26T00:20:08.97Z" }, ]