Releases: astral-sh/ty
0.0.49
Release Notes
Released on 2026-06-11.
Bug fixes
- Fix site-package error when multiple versions of Python are installed in system path (#25769)
Diagnostics
- Point at attribute's binding site in `invalid-await diagnostic (#24628)
- Report redefined legacy TypeVars (#25854)
Performance
- Add dedicated TDDs for narrowing constraints (#25834)
- Avoid caching same-file raw signatures (#25761)
- Cache reachability evaluations during inference (#25696)
- Compact retained definition maps (#25737)
- Omit redundant definition inference owner keys (#25837)
Core type checking
- Preserve nominal type of
enum.propertyinstances (#25849) - Restrict length narrowing to types that encode their length (#25840)
- Use peer context for collection literals (#25848)
Contributors
Install ty 0.0.49
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.49/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.49/ty-installer.ps1 | iex"Download ty 0.0.49
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.48
Release Notes
Released on 2026-06-10.
Performance
- Avoid redundant constraint saturation work (#25786)
Core type checking
- Add support for TypedDict
extra_items(#25591) - Improve
closed=TrueTypedDict precision (#25651) - Require subtyping for transitive constraint pivots (#25778)
- Sync vendored typeshed stubs (#25828). Typeshed diff
Contributors
Install ty 0.0.48
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.48/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.48/ty-installer.ps1 | iex"Download ty 0.0.48
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.47
Release Notes
Released on 2026-06-10.
Bug fixes
- Avoid panicking on encountering a recursive NamedTuple that references a recursive NewType (#25764)
- Fix out-of-bound panic in notebooks involving suppression comments (#25629)
Core type checking
- Preserve overloads through callable protocol decorators (#25806)
- Sync vendored typeshed stubs (#25779). Typeshed diff
Performance and memory-usage improvements
- Avoid caching specialization-invariant known instances (#25816)
- Avoid resolving overload sets for ordinary functions (#25817)
- Store common definition inference results inline (#25814)
- Use
Box<SystemPath>etc. inFiles(#25554)
Contributors
Install ty 0.0.47
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.47/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.47/ty-installer.ps1 | iex"Download ty 0.0.47
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.46
Release Notes
Released on 2026-06-08.
Bug fixes
- Avoid crash when hovering over Callable (#25759)
Core type checking
- Support
Callable()in match statement class patterns (#25541) - Improve support for
enum.property(#25681)
Contributors
Install ty 0.0.46
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.46/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.46/ty-installer.ps1 | iex"Download ty 0.0.46
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.45
Release Notes
Released on 2026-06-08.
Bug fixes
- Avoid treating dynamic class attributes as instance attributes (#25678)
- Fix divergence in recursive inference due to ambiguous overload (#25548)
- Preserve literal promotion for mixed bounds (#25648)
Diagnostics
- Add
missing-type-argumentlint rule (#25617)
Core type checking
- Add support for narrowing on tuple match cases (#25493)
- Check implicit open TypedDict extra items (#25628)
- Create fresh copies of generic callable typevars (#24949)
- Preserve deprecation on replacement functions (#25688)
- Preserve intersection receivers during attribute lookup (#25626)
- Preserve transparent callable decorators (#25030)
Performance
- Avoid AST load for callable description names (#25728)
- Avoid caching absent class decorators and type parameters (#25689)
- Avoid caching atomic type specializations (#25663)
- Avoid caching constant constraint relations (#25656)
- Avoid caching missing implicit attributes (#25649)
- Avoid caching trivial class-header queries (#25692)
- Avoid caching trivial member lookups (#25661)
- Bypass member lookup for module imports (#25723)
- Cache constraint implication checks (#25714)
- Cache upper-bound satisfiability (#25710)
- Compact retained function type signatures (#25669)
- Compact retained use-def bindings (#25682)
- Consolidate retained narrowing constraints (#25660)
- Construct trivial constraint sets directly (#25659)
- Resolve function descriptors directly (#25675)
- Share code-generator classification across specializations (#25701)
- Share parameter lists with
Arc(#25735) - Use same-file expression inference in reachability (#25694)
Contributors
Install ty 0.0.45
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.45/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.45/ty-installer.ps1 | iex"Download ty 0.0.45
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.44
Release Notes
Released on 2026-06-04.
Bug fixes
- Avoid treating
sys.implementation.versionlikesys.version_info(#25608) - Fix anchor point for override diagnostics (#25621)
LSP server
- Show type alias value on hover (#25381)
Performance
- Add caching for pattern match narrowing (#25613)
- Compact retained definition and expression identities (#25606)
- Reuse expression cache for TypedDict union inference (#25643)
- Upgrade Salsa (#25545)
Core type checking
- Enable narrowing for unions of TypedDict (#25188)
Contributors
Install ty 0.0.44
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.44/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.44/ty-installer.ps1 | iex"Download ty 0.0.44
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.43
Release Notes
Released on 2026-06-03.
Bug fixes
- Don't inject
Unknownfrom non-callable elements of intersection call (#25538) - Don't needlessly disambiguate the same type alias (#25563)
- Fix variance inference for nested type aliases (#25567)
- Ignore rejected member annotations for synthesized bindings (#25427)
- Normalize dynamic class literals in cycle recovery (#25558)
- Register file roots for first-party search paths (#25522)
- Treat union-bound typevars like unions for
possibly-missing-attribute(#25561)
LSP server
- Suppress importable completions that are already in scope (#25479)
Performance
- Avoid retaining duplicate function signatures (#25609)
- Compact retained definition inference results (#25593)
- Compact retained definition kinds (#25610)
- Compact retained definitions by node (#25498)
- Consolidate AST ID reverse lookup (#25455)
- Consolidate retained use-def definition maps (#25499)
- Omit redundant definitions-by-node entries (#25501)
- Reuse common protocol constraints for TypedDict unions (#25598)
Diagnostics
- Improve error context for not-iterable diagnostics (#24944)
Core type checking
- Detect disjointness due to incompatible generic specializations (#24822)
- Distinguish
typing.Callablefromcollections.abc.Callable(#24954) - Include nested
global/nonlocalbindings in type inference (#25387) - Optional lower/upper bounds in individual constraints (#25435)
- Preserve slice-bound types in subscript inference (#25446)
- Reject
Selfin type aliases (#25529) - Require literal booleans for TypedDict flags (#25594)
- Support narrowing on lengths (#25347)
- Synthesize precise
__len__methods for literals (#25600) - Use callable type context to implicitly specialize generic class (#25471)
- expand type aliases inside type context unions (#25553)
Contributors
Install ty 0.0.43
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.43/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.43/ty-installer.ps1 | iex"Download ty 0.0.43
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.42
Release Notes
Released on 2026-06-01.
Bug fixes
- Fix narrowing of enum literal unions by member identity (#25520)
- Detect recursive expansion in constraint-set solving (#25442)
Core type checking
- Support tagged-union narrowing for nominal types (#24916)
- Extend
Generatorassignability workaround to Python 3.13+ (#25472) - Sync vendored typeshed stubs (#25514)
Performance
- Avoid redundant work for empty collection context (#25527)
- Deduplicate retained use-def place states (#25450)
- Compact retained semantic maps (#25238)
Contributors
Install ty 0.0.42
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.42/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.42/ty-installer.ps1 | iex"Download ty 0.0.42
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.41
Release Notes
Released on 2026-05-31.
Bug fixes
- Avoid panic for deferred dataclass field annotations (#25444)
- Avoid panic from cycle in function decorator inference (#25475)
- Ignore rejected assignments for synthesized bindings (#25340)
- Infer
boolfornotapplied to dynamic values (#25445) - Use diagnostic message as tie-breaker when sorting (#25424)
LSP server
- Add call hierarchy support (#25338)
- Add function parentheses completion (#25305)
- Display docs for matching parameter when hovering over the name of an argument passed by keyword (#25283)
- Document
completeFunctionParentheseseditor setting (#3513)
Diagnostics
- Introduce opt-in
missing-override-decoratorrule (#25111) - Improve diagnostics for syntax errors in forward annotations (#25158)
- Improve diagnostic for failed assignment to a
Callabletype (#25308)
Core type checking
- Narrow bound method overloads by receiver (#24707)
- Add disjointness for protocol method members (#25315)
- Avoid treating metaclass declarations as populated values (#25432)
- Use
TypeForminty_extensions(#25421)
Performance
- Avoid storing redundant reachability indexes (#25453)
- Compact retained semantic arrays (#25454)
- Remove excess capacity from more Salsa cached collections (#25411)
- Use compact sets for more immutable fields (#25476)
- Use ThinVec for sparse kwargs bindings (#25457)
Contributors
Install ty 0.0.41
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.41/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.41/ty-installer.ps1 | iex"Download ty 0.0.41
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>0.0.40
Release Notes
Released on 2026-05-27.
Bug fixes
- Accept complete enum-literal alias unions as enums (#25341)
- Fix diagnostics in ignored folders after adding new files (#25236)
- Show
LiteralStringwhen hovering over an inline of a literal string in an IDE (#25373)
LSP server
- Follow aliases when attempting to map a definition in a stub file to its "real" runtime definition (#25328)
- Treat Python notebook text documents as Python sources (#25393)
- Fix autocompletion for elements inside incomplete list comprehensions (#25326)
Diagnostics
- Add a subdiagnostic help message to
invalid-generic-classdiagnostics regarding incompatible variance (#25385)
Core type checking
- Ignore and reject annotations on non-name targets (#25324)
- Infer class attributes assigned by metaclass initialization (#25342)
- Reject inconsistent generic bases in "dynamic" classes created using
type(...),types.new_type(...), etc. (#25413) - Resolve enum names for all unions arms in
Literalenum subsets (#25379) - Support
typing.TypeForm(#25334) - Fix many issues in the generics solver by using constraint sets more widely to solve type variables (#24540)
Contributors
Install ty 0.0.40
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.40/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.40/ty-installer.ps1 | iex"Download ty 0.0.40
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo astral-sh/tyYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>