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.

By 0xScorPionSon

8 min read

ty 1.0.0: Astral's Rust Python Type Checker Exits Beta with 24x Speedups and Set-Theoretic Typing

ty 1.0.0 Python type checker and Rust incremental LSP architecture infographic showing 24.2x vs mypy, 73% less RAM, set-theoretic types, and uv PEP 723 integration

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 behind mypy and Pyright.
  • Newer repositories (created in the last year): 22.6% used ty, closing in on Pyright (26.0%) while mypy held 62.9% (multiple tools can appear in the same repo).
  • Notable adopters: Production repositories including FastAPI, tox, and openai/openai-python (which bumped ty to 1.0.0 in v3.62.1 on December 2, 2026) have standardized on ty.

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 --fix automatically removes redundant casts and fixes diagnostics while preserving operator precedence, while --add-ignore and --update-baseline (ty-baseline.json, currently in preview) ease legacy onboarding.
  • Correctness leap: On the official Python typing conformance suite, ty 1.0.0 dropped to 14 false positives and 13 false negatives, down from 224 false positives and 405 false negatives at Beta (compared with mypy's 190 false positives and 109 false 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

  1. First-class intersection types (ty-extensions): When a higher-order function composes multiple predicates—for example, satisfies_all(large_enough, all_positive) where large_enough requires Sized and all_positive requires Iterable[int]—ty 1.0.0 infers the exact intersection Sized & Iterable[int]. Passing [1, 2, 3] succeeds, whereas passing iter([1, 2, 3]) (an Iterator[int] with no __len__) is caught immediately as a type error. By contrast, Astral notes that mypy collapses the input to Never, Pyright flags the composition call itself, and Pyrefly infers a union Sized | Iterable[int] that lets the iterator slip through to a runtime TypeError.
  2. Bidirectional context inference: In dictionary literals and lambda sort keys (such as sorting [*runners, {"name": "Ada", "seconds": 53.2}] by runner["second"]), ty 1.0.0 propagates the TypedDict expectation into the untyped literal and flags the misspelled "second" key with a "Did you mean 'seconds'?" hint.
  3. Built-in framework modeling (no mypy plugins): Because ty does not execute arbitrary Python mypy plugins, Astral built native Rust support for Pydantic, Django, pytest, and attrs. On Pydantic BaseModel classes, ty understands Field(strict=True, alias="dry_run") coercions (accepting string paths for Path fields while rejecting "true" for strict booleans and warning on discarded field names when an alias is active).
  4. Opt-in return-type inference & strict narrowing: By default, ty leaves unannotated function return types as Unknown for gradual adoption, but passing -c 'analysis.return-type-inference="always"' propagates inferred types and hasattr guards to callers. Similarly, --warn unsound-return catches partial Any leaks like sqlite3.Cursor.fetchall() returning list[Any] for a list[str] signature—a case mypy 2.4.1 --strict misses.

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 mypy plugin execution: Codebases relying on custom mypy plugins (for example, bespoke SQLAlchemy or internal metaprogramming plugins) must either wait for native ty support or retain mypy on those modules.
  • Unannotated bodies are checked by default: Unlike mypy, which skips unannotated function bodies unless --check-untyped-defs is set, ty analyzes all code out of the box—meaning a repository passing mypy cleanly may surface dozens of latent diagnostics on its first ty check run.
  • Preview surfaces: Diagnostic baseline file formats and uv PEP 723 script environment settings are still marked as preview and may evolve in 1.x minor 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: Run uvx ty check locally to gauge baseline speed and diagnostic volume.
  • Pin ty==1.0.0 in CI: Because Astral's versioning policy permits new type errors in minor (1.x.0) releases, pin 1.0.0 in uv add --dev ty==1.0.0 and .pre-commit-config.yaml (rev: v1.0.0).
  • Baseline legacy errors cleanly: Use ty check --update-baseline for existing debt instead of littering code with # ty: ignore comments, or use --add-ignore if you prefer inline suppressions.
  • Audit mypy plugins before cutting over: Keep mypy running in parallel if your codebase depends on custom mypy plugins that ty's built-in Pydantic/Django/pytest/attrs support does not cover.
  • Swap editor LSPs: Install the official ty VS Code extension (or configure nvim-lspconfig / Zed / PyCharm) to gain 7.73x faster 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

  1. 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
  2. PyPI — ty 1.0.0 Package Page & Release Files (Released December 1, 2026): https://pypi.org/project/ty/
  3. GitHub — astral-sh/ty Releases (v1.0.0) (Released December 1, 2026): https://github.com/astral-sh/ty/releases
  4. Aleksei Aleinikov — "ty 1.0 vs. Pyrefly vs. Zuban vs. Pyright vs. 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
  5. pydevtools — "ty: Python Type Checker by Astral" (Accessed December 2, 2026): https://pydevtools.com/handbook/reference/ty/

More on Packages

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla