Packages
ty 1.0.0: Astral's Rust Python Type Checker Exits Beta with 24x Speedups and Set-Theoretic Typing
Released December 1, 2026 on PyPI and GitHub, ty 1.0.0 marks the first stable production release of Astral's Rust-based Python type checker and language server. Backed by a 29x PyPI download surge and 24x speedups at OpenAI, ty 1.0.0 ships bidirectional generics, Pydantic/Django support, and ty check --fix.
8 min read
ty 1.0.0: Astral's Rust Python Type Checker Exits Beta with 24x Speedups and Set-Theoretic Typing
Executive Summary
On December 1, 2026, Astral Software Inc. (now part of OpenAI) shipped ty v1.0.0 to PyPI and GitHub, marking the first production-stable release of its Rust-written Python type checker and Language Server Protocol (LSP) engine. Pronounced "tee-why," ty 1.0.0 (MIT license) targets Python 3.10+ codebases with bundled standard-library stubs while remaining installable on Python >=3.8 or as a standalone binary via uv tool install ty@latest.
In its release announcement, Astral disclosed that ty is now the default and most widely deployed type checker inside OpenAI across millions of lines of critical Python, yielding a median 24x speedup and 73% reduction in peak memory usage. Independent testing published December 2, 2026 by Aleksei Aleinikov on a 201-file, 17,999-line typed repository measured ty 1.0.0 at 0.042 seconds cold—24.2x faster than mypy 2.4.1 (1.015 s) and 74.9x faster than pyright 1.1.414 (3.148 s). For Python teams already using uv and ruff, ty 1.0.0 is ready for production evaluation, though projects relying on custom mypy plugins or unannotated-body exemptions must plan their migration carefully.
Adoption Telemetry & Version Changelog
Between October 2025 and October 2026, ty on PyPI recorded a 29x surge in monthly downloads, even while still carrying Beta status. According to Astral's November 2026 audit of the 25,000 most-downloaded PyPI packages:
- Overall PyPI top-25k share: 11.6% of repositories configured with a type checker already used
ty, placing it third overall behindmypyandPyright. - Newer repositories (created in the last year): 22.6% used
ty, closing in onPyright(26.0%) whilemypyheld 62.9% (multiple tools can appear in the same repo). - Notable adopters: Production repositories including
FastAPI,tox, andopenai/openai-python(which bumpedtyto1.0.0inv3.62.1on December 2, 2026) have standardized onty.
ty 1.0.0 Release Artifacts & Versioning Policy
On PyPI, ty 1.0.0 ships 18 release files (275.4 MB total across one 8.5 MB source distribution and 17 prebuilt platform wheels covering Linux glibc/musl, macOS x86-64/ARM64, and Windows x86-64/x86-32/ARM64), all uploaded via Trusted Publishing using uv/0.13.10. On GitHub Releases, binaries carry verifiable GitHub Artifact Attestations (gh attestation verify <artifact> --repo astral-sh/ty).
Alongside 1.0.0, Astral introduced an explicit SemVer-aligned stability policy:
- Patch releases (
1.0.x): Strictly limited to bug fixes and crash resolutions. - Minor releases (
1.x.0): May introduce changes to type-checking behavior that surface new type errors as conformance improves.
Key v1.0.0 highlights from the GitHub changelog and Astral blog include:
- Editor & LSP navigation: Go to Implementation, call hierarchies, type hierarchies, and file/package renaming across VS Code, Neovim (
nvim-lspconfig/vim.lsp.config), Zed, PyCharm, and Emacs (Eglot). - Auto-fix & migration tooling:
ty check --fixautomatically removes redundant casts and fixes diagnostics while preserving operator precedence, while--add-ignoreand--update-baseline(ty-baseline.json, currently in preview) ease legacy onboarding. - Correctness leap: On the official Python typing conformance suite,
ty 1.0.0dropped to 14 false positives and 13 false negatives, down from224false positives and405false negatives at Beta (compared withmypy's190false positives and109false negatives).
Type Engine Internals, Framework Support & Caveats
Unlike mypy (written in Python) or Pyright (written in TypeScript on Node.js), ty is built in Rust around a fine-grained incremental query engine (similar in spirit to Salsa-style incrementalism) and a gradual, set-theoretic type system.
Set-Theoretic Typing, Intersection Types & Bidirectional Inference
- First-class intersection types (
ty-extensions): When a higher-order function composes multiple predicates—for example,satisfies_all(large_enough, all_positive)wherelarge_enoughrequiresSizedandall_positiverequiresIterable[int]—ty 1.0.0infers the exact intersectionSized & Iterable[int]. Passing[1, 2, 3]succeeds, whereas passingiter([1, 2, 3])(anIterator[int]with no__len__) is caught immediately as a type error. By contrast, Astral notes thatmypycollapses the input toNever,Pyrightflags the composition call itself, andPyreflyinfers a unionSized | Iterable[int]that lets the iterator slip through to a runtimeTypeError. - Bidirectional context inference: In dictionary literals and lambda sort keys (such as sorting
[*runners, {"name": "Ada", "seconds": 53.2}]byrunner["second"]),ty 1.0.0propagates theTypedDictexpectation into the untyped literal and flags the misspelled"second"key with a"Did you mean 'seconds'?"hint. - Built-in framework modeling (no
mypyplugins): Becausetydoes not execute arbitrary Pythonmypyplugins, Astral built native Rust support for Pydantic, Django, pytest, and attrs. On PydanticBaseModelclasses,tyunderstandsField(strict=True, alias="dry_run")coercions (accepting string paths forPathfields while rejecting"true"for strict booleans and warning on discarded field names when an alias is active). - Opt-in return-type inference & strict narrowing: By default,
tyleaves unannotated function return types asUnknownfor gradual adoption, but passing-c 'analysis.return-type-inference="always"'propagates inferred types andhasattrguards to callers. Similarly,--warn unsound-returncatches partialAnyleaks likesqlite3.Cursor.fetchall()returninglist[Any]for alist[str]signature—a casemypy 2.4.1 --strictmisses.
Practical Configuration: pyproject.toml, uv Scripts & Baselines
You can wire ty 1.0.0 into an existing uv-managed project and pre-commit pipeline with minimal configuration, as documented in the pydevtools ty reference:
# pyproject.toml
[tool.ty.environment]
python-version = "3.13"
[tool.ty.rules]
# Catch partial Any leaks in return statements
unsound-return = "warn"
[tool.ty.project-manager]
# Preview: isolate PEP 723 standalone script dependencies via uv
script = "uv"
# .pre-commit-config.yaml
repos:
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v1.0.0
hooks:
- id: ty
args: ["--isolated"]
For large legacy repositories, run ty check --update-baseline locally to snapshot existing diagnostics into ty-baseline.json, then run ty check in CI so only new regressions fail the build. Keep --update-baseline out of CI scripts so automated pipelines cannot silently approve new type errors.
Known Limitations to Weigh Before Migrating
According to Astral and pydevtools, three caveats remain in 1.0.0:
- No
mypyplugin execution: Codebases relying on custommypyplugins (for example, bespoke SQLAlchemy or internal metaprogramming plugins) must either wait for nativetysupport or retainmypyon those modules. - Unannotated bodies are checked by default: Unlike
mypy, which skips unannotated function bodies unless--check-untyped-defsis set,tyanalyzes all code out of the box—meaning a repository passingmypycleanly may surface dozens of latent diagnostics on its firstty checkrun. - Preview surfaces: Diagnostic baseline file formats and
uvPEP 723 script environment settings are still marked as preview and may evolve in1.xminor releases.
Ecosystem Comparison & Upgrade Checklist
In December 2026, Python static analysis is no longer a two-horse race between mypy and Pyright. Three Rust-powered checkers—ty 1.0.0 (Astral/OpenAI), Pyrefly 1.5.1 (Meta), and Zuban 0.11.1 (by Jedi's author)—now compete directly on CLI throughput, LSP latency, and memory footprint:
| Checker | Version & License | Implementation | Cold CLI (18k LOC)* | Memory / Key Strength | Primary Trade-Off |
|---|---|---|---|---|---|
ty (PyPI) |
1.0.0 (MIT) |
Rust | 0.042 s (24.2x vs mypy) |
73% less RAM at OpenAI; 14 FP / 13 FN conformance; uv/Ruff synergy |
No mypy plugin loading; checks untyped bodies by default |
Pyrefly (Benchmark) |
1.5.1 |
Rust | ~1.46x slower than ty (Astral geom. mean) |
Built-in inference for untyped codebases | 7.73x slower LSP updates than ty (Astral M3 Max suite) |
Zuban (Benchmark) |
0.11.1 |
Rust | ~3.56x slower than ty (Astral geom. mean) |
64.2 MB lowest RAM; drop-in zmypy mode |
3.22x slower LSP updates than ty (Astral M3 Max suite) |
Pyright (Benchmark) |
1.1.414 |
TypeScript (Node.js) | 3.148 s (74.9x slower than ty) |
Powers VS Code Pylance; strict versioned checks | Higher CI RAM & cold-start latency |
mypy (Benchmark) |
2.4.1 |
Python | 1.015 s (24.2x slower than ty) |
Mature plugin ecosystem (Django, SQLAlchemy) |
Slowest on large monorepos; 190 FP / 109 FN |
*201-file, 17,999-line cold benchmark from Aleksei Aleinikov (Dec 2, 2026); relative Rust checker ratios from Astral's 18-project M3 Max suite (Dec 1, 2026).
Upgrade & Pilot Checklist for ty 1.0.0
- Trial without modifying
pyproject.toml: Runuvx ty checklocally to gauge baseline speed and diagnostic volume. - Pin
ty==1.0.0in CI: Because Astral's versioning policy permits new type errors in minor (1.x.0) releases, pin1.0.0inuv add --dev ty==1.0.0and.pre-commit-config.yaml(rev: v1.0.0). - Baseline legacy errors cleanly: Use
ty check --update-baselinefor existing debt instead of littering code with# ty: ignorecomments, or use--add-ignoreif you prefer inline suppressions. - Audit
mypyplugins before cutting over: Keepmypyrunning in parallel if your codebase depends on custommypyplugins thatty's built-in Pydantic/Django/pytest/attrs support does not cover. - Swap editor LSPs: Install the official
tyVS Code extension (or configurenvim-lspconfig/ Zed / PyCharm) to gain7.73xfaster incremental edit diagnostics.
Frequently Asked Questions
How fast is ty 1.0.0 compared to mypy and Pyright?
In an independent December 2, 2026 benchmark on a 201-file, 17,999-line Python codebase, ty 1.0.0 finished a cold check in 0.042 seconds, making it 24.2x faster than mypy 2.4.1 (1.015 s) and 74.9x faster than pyright 1.1.414 (3.148 s). Across millions of lines of Python at OpenAI, migrating to ty delivered a median 24x speedup and 73% lower peak memory usage.
Does ty 1.0.0 support mypy plugins like pydantic.mypy or django-stubs?
ty does not execute Python-based mypy plugins. Instead, ty 1.0.0 ships native Rust-level understanding of Pydantic, Django, pytest, and attrs. If your project depends on custom or niche mypy plugins, verify diagnostics side-by-side before retiring mypy.
Why did ty report errors in functions that mypy passed?
By default, ty type-checks unannotated function bodies, whereas mypy skips them unless --check-untyped-defs is enabled. You can either fix the surfaced bugs, generate a baseline with ty check --update-baseline, or add inline suppressions via ty check --add-ignore.
Can ty 1.0.0 type-check standalone PEP 723 Python scripts?
Yes—with a preview flag. Setting project-manager.script = "uv" in your ty configuration lets ty ask uv to resolve and isolate each standalone script's inline PEP 723 dependencies, even when scripts target different Python versions than the main repository.
What is Astral's backward-compatibility guarantee for ty 1.0.0?
Under Astral's 1.0 versioning policy, patch releases (1.0.x) contain bug fixes only and will not intentionally introduce new type errors, whereas minor releases (1.x.0) may tighten type checking and surface new diagnostics. Pin ty to an exact minor or patch version in CI.
Sources
- Astral Blog — "
ty 1.0: an extremely fast Python type checker and language server" (Published December 1, 2026): https://astral.sh/blog/ty-1.0 - PyPI —
ty 1.0.0Package Page & Release Files (Released December 1, 2026): https://pypi.org/project/ty/ - GitHub —
astral-sh/tyReleases (v1.0.0) (Released December 1, 2026): https://github.com/astral-sh/ty/releases - Aleksei Aleinikov — "
ty 1.0vs.Pyreflyvs.Zubanvs.Pyrightvs.mypy: The Python Type Checker Benchmark" (Published December 2, 2026): https://www.alekseialeinikov.com/en/blog/topics/programming/ty-vs-pyrefly-vs-zuban-vs-pyright-vs-mypy - pydevtools — "
ty: Python Type Checker by Astral" (Accessed December 2, 2026): https://pydevtools.com/handbook/reference/ty/