Release Notes
Released on 2026-11-30.
Bug fixes
- Fix a stack overflow when ty uses a generic function’s return annotation to infer type arguments for a call involving a recursive type alias. (#30934)
- Fix a crash when an enum inherits a
_value_annotation that refers to one of the subclass’s own members. (#30765) - Use the field converter’s input type in generated attrs constructors when a validator leaves multiple
attrs.field()overloads that agree on the field options. (#31131) - Preserve field options such as
kw_only=Truein constructors generated bydataclass_transformwhen matching field-specifier overloads differ only in the type of the default. (#31131)
Performance improvements
- Exit sooner when a program reading
ty checkoutput closes the pipe early, as inty check | head. (#31141) - Speed up one-shot
ty check --update-baselineruns when memory reporting is disabled. (#31059) - Reduce the cost of reusing parsed Python modules during type checking. (#31008)
- Resolve references to module-level names inside functions faster by reusing information already collected for the file. (#31125)
Core type checking
- Allow
factory_boysubclasses to redeclare nestedMetaandParamsconfiguration classes without triggeringincompatible-attribute-override. ty reportsmissing-attributewhen code tries to access these configuration classes as attributes of the resulting factory. (#30939) - Preserve
Neverfield types in generated dataclass__init__methods and, on Python 3.13 and later, in__replace__methods. This also catches invalid arguments when a generic field is specialized toNever. (#31135)
Other changes
- Clarify how ty names constructor parameters for private attrs fields and how converters affect accepted constructor arguments and the types of field reads. (#5149)
- Refresh the published type checker benchmarks for ty 0.0.114 and newer versions of Pyrefly, mypy, and Zuban. (#5144, #5145)
Contributors
Install ty 0.0.115
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ty/releases/download/0.0.115/ty-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ty/releases/download/0.0.115/ty-installer.ps1 | iex"Download ty 0.0.115
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>