Releases: astral-sh/ty
Release list
0.0.72
Release Notes
Released on 2026-08-14.
Preview features
- Check PEP 723 scripts in isolation (#27462)
Library support
- Pydantic: Accept documented boolean and fractional inputs (#27754)
- Pydantic: Accept enum members for lax string and integer fields (#27751)
Diagnostics
- Improve assignability hints for protocols and
TypedDicttypes (#27717)
Core type checking
- Avoid treating augmented assignments as attribute definitions (#27633)
- Diagnose invalid module-level
__getattr__calls (#27507) - Fix overload argument expansion with unpacked positional arguments (#27744)
- Fix specialization of generic
TypedDictaliases (#27760) - Ignore generic declaration metadata in staticness checks (#27692)
- Preserve tuple types containing
Never(#27580) - Report deprecated unary operations (#27584)
- Respect variance when inferring structural and callable types (#27707)
- Support
TypeVarTuplein call binding (#26886) - Treat generator-expression exceptions as eagerly evaluated (#27735)
Performance
- Avoid exponential narrowing of gradual string-literal unions (#27742)
Contributors
Install ty 0.0.72
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.72/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.72/ty-installer.ps1 | iex"Download ty 0.0.72
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.71
Release Notes
Released on 2026-08-12.
Library support
- Respect third-party keyword-only fields before Python 3.10 (#27699)
Diagnostics
- Diagnose invalid
__getattribute__calls (#27506) - Validate boolean conversion in comprehension filters (#27641)
- Validate unpacked callable argument shapes (#27516)
Core type checking
- Avoid introducing boolean literals when narrowing integers (#27698)
- Fix truthiness inference for subclassable known classes (#27638)
- Handle class objects that may be descriptors (#26687)
- Infer type variables through nominal
type[...]parameters (#27689) - Model exception flow with operation checkpoints (#27471)
- Preserve constrained
TypeVartypes when slicing (#27645) - Preserve enum attributes on
Selfand bounded type variables (#27644) - Preserve enum exhaustiveness with custom
_missing_methods (#27700) - Preserve literal-string origin in comparison narrowing (#27582)
- Resolve generic type aliases subscripted inside
type[](#27663) - Restrict equality impossibility to static bounds (#27655)
Performance
- Avoid deriving sequents for type variables with concrete bounds (#27587)
Contributors
Install ty 0.0.71
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.71/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.71/ty-installer.ps1 | iex"Download ty 0.0.71
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.70
Release Notes
Released on 2026-08-10.
LSP server
- Enable and downrank auto-import completions from stub-only modules (#27433)
- Fix signature help at end of file (#27622)
- Normalize type labels in structured docstrings (#26923)
- Preserve typing-only completion ranking in
TYPE_CHECKINGblocks (#27549)
CLI
- Avoid deadlock when scheduling watch checks (#27605)
Diagnostics
- Add an opt-in
unsound-return-statementlint (#27561) - Add an opt-in
unsound-yieldlint (#27593) - Diagnose invalid
__getattr__calls (#27502) - Diagnose invalid descriptor
__get__calls (#27400)
Core type checking
- Consider object members in protocol comparisons (#27532)
- Exclude quantified constraints from semantic type walks (#27613)
- Expand
Generatoraliases when evaluating return, send, and yield types (#27577) - Infer precise
TypedDictkey-membership truthiness (#27579) - Infer variance through
type[T](#27534) - Preserve contextual inference for declarations in loops (#27594)
- Recognize overlapping
NewTypetypes and their underlying values (#27522) - Require
ClassVardeclarations for protocol members (#27530) - Stabilize recursive gradual type alias materialization (#27563)
- Support
Annotatedinsidetype[...](#27629) - Validate augmented assignment stores (#27545)
Contributors
Install ty 0.0.70
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.70/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.70/ty-installer.ps1 | iex"Download ty 0.0.70
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.69
Release Notes
Released on 2026-08-06.
Core type checking
-
isinstancenarrowing for generic classes is now more gradual by default (#27308)This new behavior is more similar to what other major type checkers do. For example:
def f(xs: object): if isinstance(xs, list): reveal_type(xs) # now: `list[Unknown]`, before: `Top[list[Unknown]]`
Note: you might consider enabling
analysis.strict-generic-narrowing
if you prefer the strictly correct behavior.
Contributors
Install ty 0.0.69
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.69/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.69/ty-installer.ps1 | iex"Download ty 0.0.69
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.68
Release Notes
Released on 2026-08-05.
Diagnostics
- Preserve property getter call errors (#27509)
- Simplify numeric tower displays (e.g.,
floatoverint | float) (#27406) - Suggest closing open
TypedDicttypes forMappingcompatibility (#27512)
Core type checking
- Avoid double inference of
Unpackoperands inUnion(#27525) - Fix panic from mismatched OR-pattern bindings (#27533)
Contributors
Install ty 0.0.68
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.68/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.68/ty-installer.ps1 | iex"Download ty 0.0.68
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.67
Release Notes
Released on 2026-08-05.
LSP server
- Fix unused hints for OR-pattern captures (#27438)
- Index match-pattern bindings as symbols (#27260)
- Retain typing-only symbols in explicit completions (#27435)
Diagnostics
- Preserve called types in intersection diagnostics (#27475)
- Suppress
unimported-revealdiagnostics in stub files andif TYPE_CHECKINGblocks (#27508)
Configuration
- Remove deprecated
src.rootsetting in favor ofenvironment.root(#27456)
Core type checking
- Check property compatibility when matching class objects to protocols (#27402)
- Fix constructor calls on narrowed type-variable intersections (#27493)
- Fix specialization cycle with deferred TypeVar defaults (#27453)
- Infer generic TypedDicts from unpacked TypedDicts (#27439)
- Infer generic TypedDicts through synthesized constructor signatures (#27436)
- Normalize unpacked callable signatures for assignability (#27450)
- Preserve class type parameters through generic decorators (#27442)
- Preserve generic class type variables in constructor inference (#27340)
- Preserve return constraints for object-variadic callables (#27431)
- Preserve return constraints for top callables (#27446)
- Recover generic constructor types from failing overloads (#27460)
- Reject Self with incompatible explicit receiver annotations (#27454)
- Reject unhashable objects for Hashable protocols (#27441)
- Reject unsupported
dataclass_transformparameters (#27458) - Restore bottom callable subtyping for gradual prefixes (#27519)
- Top-materialize
is_dataclasstype guard (#27455) - Validate constructor calls on unbounded type variables (#27449)
Performance
- Avoid exponential slowdown copying narrowed TypedDict unions (#27492)
Contributors
Install ty 0.0.67
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.67/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.67/ty-installer.ps1 | iex"Download ty 0.0.67
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.66
Release Notes
Released on 2026-08-03.
LSP server
- Index
with-statement targets as symbols (#27256) - Trigger signature help after completing callable with parentheses (#27084)
Library support
- Pydantic: Recognize models installed on extra search paths (#27429)
Diagnostics
- Detect
__aenter__and__aexit__that do not return awaitables (#27414) - Diagnose dataclass fields after inherited defaults (#27327)
- Emit diagnostic when specializing a non-generic class (#26883)
- Improve error context for incompatible callable signatures (#27422)
- Preserve forwarded expanded-variadic diagnostic sources (#27266)
Core type checking
- Avoid over-materializing user-defined
TypeIsreturn types (#26864) - Fix enum class container assignability (#27318)
- Hide stub-only helpers from implicit builtin lookup (#27423)
- Move
Unknownout of the experimentalty_extensionsAPI (#27430) - Preserve
TypeVarTuplecontext duringGenericrecovery (#27381) - Preserve exact numeric types in covariant collections (#27311)
- Reject
ClassVarandFinalqualifiers inNamedTuplefields (#27380) - Reject out-of-scope
ParamSpeccomponents (#27378) - Reject specializing non-generic subclasses (#27377)
- Respect bounds and constraints in generic materializations (#27228)
- Sync vendored typeshed stubs (#27401). Typeshed diff
Contributors
- @dhruvmanila
- @carljm
- @Punisheroot
- @AlexWaygood
- @cheparity
- @BitWeaverDev
- @charliermarsh
- @ribru17
- @sharkdp
Install ty 0.0.66
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.66/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.66/ty-installer.ps1 | iex"Download ty 0.0.66
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.65
Release Notes
Released on 2026-07-29.
LSP server
- Support comprehension walruses in IDE features (#26476)
Library support
- Pydantic: Allow mutation of private attributes on frozen models (#27257)
- Pydantic: Synthesize
__replace__for models (#27220)
Diagnostics
- Correct
ParamSpecforwarded-argument diagnostic locations (#27263) - Recover forwarded callable object and constructor sources (#27264)
- Recover forwarded
functools.partialdiagnostic sources (#27265)
Core type checking
- Fix gradual class assignability with generic receivers (#27223)
- Lazily materialize protocol attributes (#27267)
- Narrow tagged unions through all type kinds (#27226)
- Prefer static constrained TypeVar solutions (#27057)
- Preserve frozen-dataclass setter delegation (#27217)
- Preserve inference when filtering constructor overloads (#27254)
- Reject frozen-dataclass field deletion through subclasses (#27001)
- Stabilize recursive type-constraint ordering (#27176)
- Support materialized class type expressions (#27258)
Performance
- Avoid quadratic inference for large literal unions (#27178)
- Cache protocol receiver binding (#27301)
Contributors
Install ty 0.0.65
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.65/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.65/ty-installer.ps1 | iex"Download ty 0.0.65
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.64
Release Notes
Released on 2026-07-27.
Bug fixes
LSP server
- Fix ParamSpec declaration hover and type navigation (#27183)
- Implement LSP
textDocument/implementationrequest (#25410) - Introduce shared primitives for parsing backticks in docstrings (#26928)
- Render NumPy docstrings as structured Markdown (#25925)
CLI
Diagnostics
- Add a lint rule for combined abstract and final decorators (#26932)
- Change
--add-ignoreto add space after the colon forty: ignore(#27120) - Fix
missing-override-decoratorsuggestion before Python 3.12 (#27166) - Reuse full call diagnostics for implicit setter calls (#27115)
Configuration
Core type checking
- Decorate only overload implementation signatures (#27147)
- Don't consider known-instance types, generic aliases or non-singleton special-form types to be single-valued (#27137)
- Improve identity comparison inference for singleton types (#27126)
- Improve tuple membership and rich comparison inference (#27164)
- Model walrus bindings from comprehensions (#26466)
- Narrow tagged unions using identity comparisons (#27130)
- Preserve
Selfin__new__calls (#27003) - Preserve receiver constraints when binding overloaded methods (#27038)
- Support generic manual PEP 695 type aliases (#27083)
- Treat bivariance as covariant (#24319)
Performance
- Avoid cycles when resolving
ModuleTypeglobals (#27182) - Avoid expanding optional enum comparisons (#27105)
- Avoid repeated inference when copying mixed
TypedDictunions (#27108) - Improve importer performance (#27159)
- Improve union and intersection builder performance (#27167)
Contributors
- @perfloop-agent
- @carljm
- @lerebear
- @Gankra
- @TrapsterDK
- @MichaReiser
- @thejchap
- @mtshiba
- @denyszhak
- @charliermarsh
- @AlexWaygood
Install ty 0.0.64
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.64/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.64/ty-installer.ps1 | iex"Download ty 0.0.64
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.63
Release Notes
Released on 2026-07-23.
Core type checking
- Handle generic stringified PEP 613 (
typing.TypeAlias) type aliases (#27092) - Allow equality narrowing across non-final classes (#27031)
- Allow interpolated string literals to be promoted to
str(#27104) - Fix double specialization of generic type aliases (#27058)
- Fix intersections of
typeandTypeForm(#27099) - When narrowing from a
matchstatement leads a variablexto be inferred asA & B, infer the type ofx.attras<type of A.attr> & <type of B.attr>(#27103)
Library support
- Pydantic: Stricter validation of sub-model fields in lax mode (#27091)
- Pydantic: Support special underscore parameters in
BaseSettingsmodels (#27098)
Performance
- Avoid exponential narrowing of optional dynamic
matchsubjects (#27100) - Avoid normalizing cached absolute file paths (#26998)
Contributors
Install ty 0.0.63
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.63/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.63/ty-installer.ps1 | iex"Download ty 0.0.63
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>