Skip to content

Added support for PEP 758, which allows Python 3.14 and newer to supp…#10561

Merged
erictraut merged 1 commit intomainfrom
issue-10546
Jun 8, 2025
Merged

Added support for PEP 758, which allows Python 3.14 and newer to supp…#10561
erictraut merged 1 commit intomainfrom
issue-10546

Conversation

@erictraut
Copy link
Collaborator

…ort multiple exceptions in an except clause without surrounding parentheses. This addresses #10546.

…ort multiple exceptions in an `except` clause without surrounding parentheses. This addresses #10546.
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2025

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
+   ...:554:13 - error: Cannot access attribute "canon_bp" for class "Expr"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:554:13 - error: Cannot access attribute "canon_bp" for class "One"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:554:13 - error: Cannot access attribute "canon_bp" for class "Zero"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:554:13 - error: Cannot access attribute "canon_bp" for class "TensExpr"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Expr"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Zero"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "One"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "NegativeOne"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Integer"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "NaN"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "ComplexInfinity"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Rational"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Infinity"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "NegativeInfinity"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Float"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:558:15 - error: Cannot access attribute "canon_bp" for class "Number"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "Expr"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "One"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "NegativeOne"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "Zero"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "Integer"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "NaN"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "ComplexInfinity"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "Rational"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "Infinity"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "NegativeInfinity"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:577:13 - error: Cannot access attribute "canon_bp" for class "Float"
+     Attribute "canon_bp" is unknown (reportAttributeAccessIssue)
+   ...:1602:36 - error: "__getitem__" method not defined on type "NegativeOne" (reportIndexIssue)
+   ...:1602:36 - error: "__getitem__" method not defined on type "One" (reportIndexIssue)
+   ...:1602:36 - error: "__getitem__" method not defined on type "TensExpr" (reportIndexIssue)
+   ...:1608:43 - error: "__getitem__" method not defined on type "NegativeOne" (reportIndexIssue)
+   ...:1608:43 - error: "__getitem__" method not defined on type "One" (reportIndexIssue)
+   ...:1608:43 - error: "__getitem__" method not defined on type "TensExpr" (reportIndexIssue)
+   ...:1694:44 - error: Cannot access attribute "data" for class "NegativeOne"
+     Attribute "data" is unknown (reportAttributeAccessIssue)
+   ...:1694:44 - error: Cannot access attribute "data" for class "One"
+     Attribute "data" is unknown (reportAttributeAccessIssue)
+   ...:1694:44 - error: Cannot access attribute "data" for class "TensExpr"
+     Attribute "data" is unknown (reportAttributeAccessIssue)
+   ...:288:16 - error: Type "Basic" is not assignable to declared type "Expr"
+     "Basic" is not assignable to "Expr" (reportAssignmentType)
-   ...:1802:43 - error: Cannot access attribute "simplify" for class "tuple[Unknown | Basic | Add | Dict, bool]"
+   ...:1802:43 - error: Cannot access attribute "simplify" for class "tuple[Unknown | Basic | Add | Expr | Mul | Dict, bool]"
-   ...:1828:48 - error: Cannot access attribute "simplify" for class "tuple[Unknown | Basic | Add | Dict, bool]"
+   ...:1828:48 - error: Cannot access attribute "simplify" for class "tuple[Unknown | Basic | Add | Expr | Mul | Dict, bool]"
+   ...:253:7 - error: Base classes for class "DyadicAdd" define method "as_content_primitive" in incompatible way
+     Return type mismatch: base method returns type "tuple[One, Self@Expr]", override returns type "tuple[One | NegativeOne | Zero | Integer | Expr | Unknown | Rational | NaN | ComplexInfinity, Expr | Unknown | Self@Add]"
+       "tuple[One | NegativeOne | Zero | Integer | Expr | Unknown | Rational | NaN | ComplexInfinity, Expr | Unknown | Self@Add]" is not assignable to "tuple[One, Self@Expr]"
+         Tuple entry 1 is incorrect type
+           Type "One | NegativeOne | Zero | Integer | Expr | Unknown | Rational | NaN | ComplexInfinity" is not assignable to type "One"
+             "Expr" is not assignable to "One" (reportIncompatibleMethodOverride)
+   ...:496:7 - error: Base classes for class "VectorAdd" define method "as_content_primitive" in incompatible way
+     Return type mismatch: base method returns type "tuple[One, Self@Expr]", override returns type "tuple[One | NegativeOne | Zero | Integer | Expr | Unknown | Rational | NaN | ComplexInfinity, Expr | Unknown | Self@Add]"
+       "tuple[One | NegativeOne | Zero | Integer | Expr | Unknown | Rational | NaN | ComplexInfinity, Expr | Unknown | Self@Add]" is not assignable to "tuple[One, Self@Expr]"
+         Tuple entry 1 is incorrect type
+           Type "One | NegativeOne | Zero | Integer | Expr | Unknown | Rational | NaN | ComplexInfinity" is not assignable to type "One"
+             "Expr" is not assignable to "One" (reportIncompatibleMethodOverride)
- 33352 errors, 74 warnings, 0 informations 
+ 33391 errors, 74 warnings, 0 informations 

@erictraut erictraut merged commit 0f8ded0 into main Jun 8, 2025
17 checks passed
@erictraut erictraut deleted the issue-10546 branch June 8, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant