Files
astral-sh-uv/docs
Tomasz Kramkowski ea707737bb Allow configuring preview features in uv.toml and pyproject.toml (#18437)
## Summary

This is a continuation of the excellent work by @j-helland in #16452 and
#17202 and closes #15767.

This PR adds `preview-features` to `uv.toml` and `pyproject.toml`.

This field can be set to a boolean or to a list of features.

It is intended to supersede the `preview` setting itself, and conflicts
with it.

There's a little bit of complexity required to ensure that setting
either `preview` or `preview-features` is combined at the right point,
but it's also necessary to leave them split to accurately warn when a
`uv.toml` masks a `pyproject.toml` in the same directory.

Additionally there's complexity involved in making things work with
`deny_unknown_fields` and `flatten` (they're incompatible so require
manual flattening) and also this improves error messages somewhat.

Also (supersedes) closes #16452 and (supersedes) closes #17202.

## Test Plan

Tests taken from the original PR with some alterations and a bunch of
additional tests.

---------

Co-authored-by: j-helland <jonathan.w.helland@gmail.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-06-14 11:06:53 +00:00
..
2026-06-11 17:39:38 +00:00