Skip to content

[ty] Use 3.14 as the default version#20759

Merged
sharkdp merged 2 commits into
mainfrom
david/ty-3.14-update
Oct 8, 2025
Merged

[ty] Use 3.14 as the default version#20759
sharkdp merged 2 commits into
mainfrom
david/ty-3.14-update

Conversation

@sharkdp

@sharkdp sharkdp commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Summary

Bump the latest supported Python version of ty to 3.14 and updates some references from 3.13 to 3.14.

This also fixes a bug with dataclasses.field on 3.14 (which adds a new keyword-only parameter to that function, breaking our previously naive matching on the parameter structure of that function).

Test Plan

A ty check on a file with template strings (without any further configuration) doesn't raise errors anymore.

@sharkdp sharkdp added the ty Multi-file analysis & type inference label Oct 8, 2025
@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Diagnostic diff on typing conformance tests

Changes were detected when running ty on typing conformance tests
--- old-output.txt	2025-10-08 09:29:07.256383703 +0000
+++ new-output.txt	2025-10-08 09:29:10.537406870 +0000
@@ -1,6 +1,6 @@
 WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.
 fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/execute.rs:217:25 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_type_statement.py`: `PEP695TypeAliasType < 'db >::value_type_(Id(cc17)): execute: too many cycle iterations`
-fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/execute.rs:217:25 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_typealiastype.py`: `infer_definition_types(Id(16432)): execute: too many cycle iterations`
+fatal[panic] Panicked at /home/runner/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/29ab321/src/function/execute.rs:217:25 when checking `/home/runner/work/ruff/ruff/typing/conformance/tests/aliases_typealiastype.py`: `infer_definition_types(Id(1643f)): execute: too many cycle iterations`
 _directives_deprecated_library.py:15:31: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int`
 _directives_deprecated_library.py:30:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `str`
 _directives_deprecated_library.py:36:41: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Self@__add__`
@@ -743,6 +743,8 @@
 protocols_subtyping.py:38:5: error[invalid-assignment] Object of type `Proto2` is not assignable to `Concrete2`
 protocols_subtyping.py:55:5: error[invalid-assignment] Object of type `Proto2` is not assignable to `Proto3`
 protocols_variance.py:85:62: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `R@__call__`
+qualifiers_annotated.py:36:42: error[invalid-syntax] named expression cannot be used within a type annotation
+qualifiers_annotated.py:40:28: error[invalid-syntax] await expression cannot be used within a type annotation
 qualifiers_annotated.py:43:17: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
 qualifiers_annotated.py:44:17: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression
 qualifiers_annotated.py:44:18: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
@@ -856,5 +858,5 @@
 typeddicts_usage.py:28:17: error[missing-typed-dict-key] Missing required key 'name' in TypedDict `Movie` constructor
 typeddicts_usage.py:28:18: error[invalid-key] Invalid key access on TypedDict `Movie`: Unknown key "title"
 typeddicts_usage.py:40:24: error[invalid-type-form] The special form `typing.TypedDict` is not allowed in type expressions. Did you mean to use a concrete TypedDict or `collections.abc.Mapping[str, object]` instead?
-Found 857 diagnostics
+Found 859 diagnostics
 WARN A fatal error occurred while checking some files. Not all project files were analyzed. See the diagnostics list above for details.

@sharkdp

This comment was marked as resolved.

@sharkdp sharkdp force-pushed the david/ty-3.14-update branch from 78efd30 to 8ce54bd Compare October 8, 2025 08:53
@sharkdp

sharkdp commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author
+qualifiers_annotated.py:36:42: error[invalid-syntax] named expression cannot be used within a type annotation
+qualifiers_annotated.py:40:28: error[invalid-syntax] await expression cannot be used within a type annotation

These are syntax errors now. I'll open a PR upstream (Edit: python/typing#2093).

@sharkdp sharkdp force-pushed the david/ty-3.14-update branch from 8ce54bd to 95de6b8 Compare October 8, 2025 09:27
@sharkdp sharkdp merged commit 1f1542d into main Oct 8, 2025
38 checks passed
@sharkdp sharkdp deleted the david/ty-3.14-update branch October 8, 2025 09:38
@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants