Astral Adds uv check, and ty Will Read PEP 723 Script Metadata
Software / news
Astral Adds uv check, and ty Will Read PEP 723 Script Metadata
The integration is experimental, and environment setup for scripts is opt-in because installing dependencies can run third-party code.
Astral published an experimental integration of its package manager uv and its type checker ty on Oct. 13, adding a uv check command and making ty read the dependency metadata inside standalone Python scripts. It needs uv 0.12.3 or later and ty 0.0.76 or later, and the announcement post, written by Sara Sklenka, calls it a preview.
The post describes two changes. The first covers PEP 723 scripts, a format where a single .py file declares its own dependencies and Python version in a comment block. uv already builds environments from that block. ty now uses the same block, so each script is checked against its own requirements and not those of the project around it.
The task it fixes: a script that disagrees with its project
A script can declare requirements that differ from the project around it. Under the integration, ty discovers scripts across the project and asks uv to create an environment for each one.
In VS Code the switch is a single setting, ty.experimental.useUv, set to "on". From the command line it is the environment variable TY_UV=scripts in front of ty check.
Why environment setup is opt-in
The post says automatic setup for scripts is off by default because installing dependencies can run third-party code. That is the sticking point for anyone who opens a downloaded script in an editor: with the setting on, opening it can trigger an install of whatever it declares. Astral says it plans to turn script support on by default and, later, automatic setup for standard projects, without giving a date for either.
What uv check does
uv check prepares the project environment, installs the dependencies and runs ty. Astral says it plans to add its linter Ruff later so that linting and type checking run in one command. The ty binary is installed on first use, so anyone who never runs the command sees no change.
| Command | What it checks |
|---|---|
uv check | The current project |
uv check --package <name> | One workspace package |
uv check --all-packages | Every package in a workspace |
uv check --script example.py | A standalone script, against its own declared requirements |
The design choice that matters for teams is version pinning. uv check runs the version of ty recorded in the project's lockfile, so a developer's laptop and the CI job use the same checker without a separate pin. The ty pre-commit hook now calls uv check internally.
Versions as of Oct. 25
The requirements are low enough that most current installs meet them. The uv releases page lists 0.13.5 as the latest release, and the ty releases page lists 0.0.91, published Oct. 22. ty's 0.0.x numbering still marks it as pre-1.0, and the post says Astral continues working toward a stable release.
Under the hood the integration relies on uv workspace metadata, which gives ty a structured view of packages, dependencies and the interpreter. The uv 0.13.2 release on Oct. 19 changed that command to report all installed packages.
Astral credits Aria Desires, Micha Reiser and Zsolt Dollenstein with the implementation. It is also working on checks that combine uv's dependency knowledge with ty's code analysis, such as flagging unused dependencies, and said they will be covered in a later post.
Other toolchain releases this month are covered in Wild 0.11.0 and Rune 1.3.1.
Sources
More in Software
- 01Respan Rewrites Its LiteLLM-Based AI Gateway in Rust, With Every Feature a PluginThe Y Combinator company says a 100,000-line wrapper pushed it off LiteLLM. Its own benchmark table is vendor-supplied, and the launch thread left cost accounting unanswered.
- 02Corgi and JetBrains' ThinkRail Both Want to Be Where You Run Coding Agents. One Is a Multiplexer, One an IDE.Corgi (MIT, 141 stars) wraps Claude Code and Codex in a terminal; ThinkRail (Apache-2.0, 1.2k stars) builds an IDE around the pi agent. What each README says and leaves out.
- 03Coolify 4.5.0 Encrypts Stored Secrets and Breaks Three Things Self-Hosters May Rely OnThe self-hosted PaaS shipped 4.5.0 on Oct. 23, two days after a security release for PHP2Shell. The changelog buries the API and Compose changes under about 100 items.
- 04TornadoVM 7.3 Drops JNI for Java's FFM API and Ships Three Releases in Nine DaysInfoQ's write-up of the Java GPU framework gives no benchmark figures, while the project's own pages supply speedups of 6x, 99x and 117 tokens a second.