Sign in

Charlie Marsh

@crmarsh.com
7.8K followers 315 following 270 posts

Building Astral: Ruff, uv, and other high-performance Python tools, written in Rust.

PostsRepliesMedia
Charlie Marsh @crmarsh.com · 13/08/2025
Today, we're announcing our first hosted infrastructure product: pyx, a Python-native package registry. We think of pyx as an optimized backend for uv: it’s a package registry, but it also solves problems that go beyond the scope of a traditional "package registry".
417237
Charlie Marsh @crmarsh.com · 03/07/2025
The uv build backend is now stable, and considered ready for production use. An alternative to setuptools, hatchling, etc. for pure Python projects, with a focus on good defaults, user-friendly error messages, and performance. When used with uv, it's 10-35x faster.
523643
Charlie Marsh @crmarsh.com · 13/05/2025
Alongside the preview release, we're also shipping an official VS Code extension. And you can use `ty server` directly in any editor that supports the Language Server Protocol (Neovim, etc.).
1150
Charlie Marsh @crmarsh.com · 13/05/2025
Today, we’re announcing the preview release of ty, an extremely fast type checker and language server for Python, written in Rust. In early testing, it's 10x, 50x, even 100x faster than existing type checkers. (We've seen >600x speed-ups over Mypy in some real-world projects.)
1433384
Charlie Marsh @crmarsh.com · 16/02/2025
uv is one year old today. Hard to believe its only been a year. The growth, adoption, and impact surpassed my wildest expectations. Happy birthday, uv! 🥳
1741136
Charlie Marsh @crmarsh.com · 29/01/2025
We’re building a new static type checker for Python, from scratch, in Rust. From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!
35722104
Charlie Marsh @crmarsh.com · 29/01/2025
Once selected, Quick Fix actions will allow you to install missing packages into your environment with uv.
0100
Charlie Marsh @crmarsh.com · 29/01/2025
You can now choose uv when setting the Python interpreter for your project, which will then invoke uv to create the virtual environment.
1140
Charlie Marsh @crmarsh.com · 29/01/2025
Incredible: PyCharm now ships with first-class support for uv!
51094
Charlie Marsh @crmarsh.com · 08/01/2025
We now have first-class documentation for using uv with AWS Lambda docs.astral.sh/uv/guides/in...
4728
Charlie Marsh @crmarsh.com · 08/01/2025
In the next uv release, resolving Apache Airflow (with a warm cache) gets over 2x faster.
3622
Charlie Marsh @crmarsh.com · 07/01/2025
You can now install the latest Python 3.14 alpha with uv
uv python install 3.14 --preview
512610
Charlie Marsh @crmarsh.com · 06/01/2025
When we get Renovate PRs for dependencies that people on the Astral team maintain
2280
Charlie Marsh @crmarsh.com · 29/12/2024
Being 100% serious, for me what's described here is a big part of Rust's success. It's fun. And it makes things that are often un-fun (installing the toolchain, adding dependencies) easy.
511611
Charlie Marsh @crmarsh.com · 25/12/2024
My Christmas gift is this series of PRs making standalone PEP 723 scripts first-class targets for all uv commands. You'll be able to create lockfiles for PEP 723 scripts, export them to requirements.txt, view the dependencies with uv tree, and more.
1856
Charlie Marsh @crmarsh.com · 23/12/2024
Hearing early reports that the first Astral PR upstreaming python-build-standalone changes to CPython has been merged...
gh-100384: Error on unguarded-availability in Darwin builds (#128155)
0451
Charlie Marsh @crmarsh.com · 23/12/2024
If you've ever seen this unguarded symbol error, it's now fixed.
A build failure indicating that the kFSEeventStreamEventFlagItemCloned symbol is unguarded.
130
Charlie Marsh @crmarsh.com · 23/12/2024
If you've ever seen this "Python.h: No such file or directory" error, it's now fixed.
A build failure indicating that Python.h could not be found.
250
Charlie Marsh @crmarsh.com · 23/12/2024
If you've ever seen this "clang: No such file or directory" error, it's now fixed.
A build failure indicating that clang could not be found.
130
Charlie Marsh @crmarsh.com · 23/12/2024
If you've ever seen this "Compiling with an SDK that doesn't seem to exist" error when building wheels on macOS, it's now fixed.
A build failure indicating that Xcode could not be found.
130
Charlie Marsh @crmarsh.com · 23/12/2024
Last week I focused on addressing quirks in python-build-standalone and fixing the common pain points with uv-installed Pythons. For example: if you've ever run into this tkinter error, it's now fixed.
A build failure indicating that Tcl wasn't installed properly.
4475
Charlie Marsh @crmarsh.com · 17/12/2024
python-build-standalone is now officially part of the Astral organization!
https://github.com/astral-sh/python-build-standalone
212215
Charlie Marsh @crmarsh.com · 15/12/2024
uv's resolver now recognizes that certain combinations of markers are impossible, even if the grammar allows them. For example, sys_platform == "darwin" and platform_system == "Windows" can't be true at the same time. Lets us do less work by solving fewer combinations.
2670
Charlie Marsh @crmarsh.com · 09/12/2024
uv has made it into GitHub's default .gitignore
gitignore/Python.gitignore, with a uv.lock entry
4983
Charlie Marsh @crmarsh.com · 04/12/2024
It's what makes `uv python install` feel magical. There's no build step!
4281
Charlie Marsh @crmarsh.com · 04/12/2024
python-build-standalone has exploded in popularity, with over 70M downloads all-time. But what is a "standalone" Python build? It wasn't obvious to me at first! Initially, I didn't understand what problem was being solved or why it mattered...
716020
Charlie Marsh @crmarsh.com · 04/12/2024
We'll continue to maintain and develop the project with the broader Python ecosystem in mind. We have four key goals.
1. Keep the project up-to-date with Python releases.
2. Upstream changes to the CPython build system.
3. Remove some of the project's existing limitations.
4. Improve the project's build and release process.
140
Charlie Marsh @crmarsh.com · 01/12/2024
The speed-up comes from using a different representation for extra dependencies that gives the solver more information upfront.
A GitHub pull request for the optimzation.
3150
Charlie Marsh @crmarsh.com · 01/12/2024
Found an optimization in uv's resolver that makes Apache Airflow (with all optional dependencies enabled) resolve >20% faster.
Hyperfine benchmark for uv resolving apache-airflow[all].
4844
Charlie Marsh @crmarsh.com · 22/11/2024
Ruff v0.8 is out now! We stabilized a bunch of rules that were previously in preview. Including a fan favorite: automatic sorting for __all__.
Diff of Lib/tarfile.py in CPython, showing sorting of __all__.
1739
Charlie Marsh @crmarsh.com · 20/11/2024
This is the Table of Concepts... from Part II
060
Charlie Marsh @crmarsh.com · 20/11/2024
This Reinforced Knowledge series of Python packaging might be the most comprehensive write-up I've... ever seen? reinforcedknowledge.com/a-comprehens...
"A Comprehensive Guide to Python Project Management and Packaging Concepts Illustrated with uv"
4678
Charlie Marsh @crmarsh.com · 20/11/2024
Looks like uv is the #1 trending Rust repo over the last month 🚀🚀🚀
1913
Charlie Marsh @crmarsh.com · 19/11/2024
uv now ships with dedicated documentation for PyTorch
"Using uv with PyTorch"
414713
Charlie Marsh @crmarsh.com · 19/11/2024
The latest uv release includes support for conflicting dependencies across optional groups. A subtle but very powerful feature. For example: use the PyTorch CPU build with `uv sync --extra cpu` and the CUDA build with `uv sync --extra gpu`. All powered by a single lockfile.
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.10.0"

[project.optional-dependencies]
cpu = ["torch==2.5.1+cpu"]
gpu = ["torch==2.5.1+cu124"]

[tool.uv]
conflicts = [
  [
    { extra = "cpu" },
    { extra = "gpu" },
  ],
]
29210
Charlie Marsh @crmarsh.com · 18/11/2024
The OG
2494
Charlie Marsh @crmarsh.com · 17/11/2024
Celebrate shipping error messages like you do shipping features, performance optimizations, etc. This is UX!
0410
Charlie Marsh @crmarsh.com · 17/11/2024
Initial uv support just landed in IntelliJ's main branch 👀
"basic support for uv env & package manager; PY-75983"
3773
Charlie Marsh @crmarsh.com · 16/11/2024
2470
Charlie Marsh @crmarsh.com · 15/11/2024
Rust has great error messages, case #12,431: If you reference a variable X, but had previously renamed its declaration to _X to mark it as unused, the compiler will point that out.
error[E0425]: cannot find value `v1` in this scope
   --> crates/uv-resolver/src/resolver/derivation.rs:111:41
    |
110 |                 if let Kind::FromDependencyOf(p1, _v1, p2, v2) = &incompat.kind {
    |                                                   --- `_v1` defined here
111 |                     if p2 == package && v1.contains(version) {
    |                                         ^^
    |
help: the leading underscore in `_v1` marks it as unused, consider renaming it to `v1`
    |
110 |                 if let Kind::FromDependencyOf(p1, v1, p2, v2) = &incompat.kind {
    |                                                   ~~

For more information about this error, try `rustc --explain E0425`.
error: could not compile `uv-resolver` (lib) due to 1 previous error
3411
Charlie Marsh @crmarsh.com · 15/11/2024
If a package fails to build during resolution or installation, uv will now tell you _why_ that package was included in the first place. I think this is such a cool error-message improvement.
help: `markupsafe` (v0.9.2) was included because `project` (v0.1.0) depends on `mypy>=0.1` (v0.1) which depends on `mako` (v1.0.0) which depends on `markupsafe>=0.9.2`
4653
Charlie Marsh @crmarsh.com · 11/11/2024
As a bonus, we got to delete a bunch of code special-casing local versions in the resolver, and a huge section in our pip compatibility guide.
1120
Charlie Marsh @crmarsh.com · 11/11/2024
The latest uv release addressed the most significant case of spec non-compliance in our resolver... The uv resolver now correctly handles local version identifiers, like the +cpu and +gpu segments you see in PyTorch versions, thanks to Eric Mark Martin from Jane Street.
"Implement PEP 440-compliant local version semantics"
2433
Charlie Marsh @crmarsh.com · 11/11/2024
Wilt Chamberlain: I once scored 100 points in a game. dtolnay: That's awesome. However over 42.5% of Rust crates depend _directly_ on at least one dtolnay crate.
"As of 2024, 60% of all published crates on crates.io depend transitively on syn; 40% depend transitively on serde; 42.5% depend directly on at least one crate by me."
0270
Charlie Marsh @crmarsh.com · 05/11/2024
This is where I live
An assigned GitHub issue with a bug label
0311
Charlie Marsh @crmarsh.com · 05/11/2024
Some examples from a PR today: viewing a change in an error message, viewing a scenario that went from non-local to local version...
1120