Skip to content

Added support for Python 3.14 "template string" feature (PEP 750). Th…#10572

Merged
erictraut merged 1 commit intomainfrom
issue-10320
Jun 9, 2025
Merged

Added support for Python 3.14 "template string" feature (PEP 750). Th…#10572
erictraut merged 1 commit intomainfrom
issue-10320

Conversation

@erictraut
Copy link
Collaborator

…is addresses #10320.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2025

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

sympy (https://github.com/sympy/sympy)
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:40:12 - error: Operator "-" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Unknown | Expr | int"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:40:12 - error: Operator "-" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Expr | Any | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Unknown | Expr | Any | int"
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:40:37 - error: Operator "**" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Literal[2]"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:40:37 - error: Operator "**" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Expr | Any | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Literal[2]"
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:84:12 - error: Operator "-" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Unknown | Expr | int"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:84:12 - error: Operator "-" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Expr | Any | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Unknown | Expr | Any | int"
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:84:37 - error: Operator "**" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Literal[2]"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:84:37 - error: Operator "**" not supported for types "Unknown | tuple[Unknown, ...] | Sum | Expr | Any | Zero | NaN | Piecewise | Basic | Literal[0] | None" and "Literal[2]"
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:137:33 - error: Operator "+" not supported for types "Expr | Basic | Expectation | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" and "Expr | Unknown | tuple[Unknown, ...] | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Any | MatMul | int"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:137:33 - error: Operator "+" not supported for types "Expr | Basic | Expectation | tuple[Unknown, ...] | Unknown | Sum | Any | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" and "Expr | Unknown | tuple[Unknown, ...] | Any | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | MatMul | int"
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:137:43 - error: Operator "*" not supported for types "Literal[2]" and "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:137:43 - error: Operator "*" not supported for types "Literal[2]" and "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:163:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+   .../projects/sympy/sympy/stats/tests/test_discrete_rv.py:163:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
-     Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
+     Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:33:23 - error: Operator "/" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:33:23 - error: Operator "/" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "*" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "*" not supported for types "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0] | None" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "/" not supported for types "Unknown | Any | Expr | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | Infinity | NegativeInfinity | Float | _NotImplementedType | tuple[Unknown, ...] | int" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | Expr | Float | ComplexInfinity | NaN | Rational | Infinity | NegativeInfinity | _NotImplementedType | tuple[Unknown, ...] | Sum | Piecewise | Basic | Integer | Lambda | Mul | NegativeOne | Number | Integral | Literal[0] | None"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:34:23 - error: Operator "/" not supported for types "Unknown | Any | Expr | One | NegativeOne | Zero | Integer | NaN | ComplexInfinity | Rational | tuple[Unknown, ...] | Infinity | NegativeInfinity | int" and "Unknown | Any | BernoulliDistribution | Probability | Zero | One | tuple[Unknown, ...] | Sum | Expr | NaN | Piecewise | Basic | ComplexInfinity | Float | Infinity | Integer | Lambda | Mul | NegativeInfinity | NegativeOne | Number | Rational | Integral | Literal[0] | None"
-   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:293:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
+   .../projects/sympy/sympy/stats/tests/test_finite_rv.py:293:21 - error: Argument of type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" cannot be assigned to parameter "expr" of type "Basic" in function "simplify"
-     Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Zero | NaN | Piecewise | Integral | Any | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"
+     Type "RandomSymbol | Basic | Expectation | Expr | tuple[Unknown, ...] | Unknown | Sum | Any | Zero | NaN | Piecewise | Integral | ExpectationMatrix | Literal[0] | None" is not assignable to type "Basic"

... (truncated 1596 lines) ...

@erictraut erictraut merged commit db0da4b into main Jun 9, 2025
17 checks passed
@erictraut erictraut deleted the issue-10320 branch June 9, 2025 18:28
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