Allow configuring preview features in uv.toml and pyproject.toml#18437
Open
EliteTK wants to merge 2 commits into
Open
Allow configuring preview features in uv.toml and pyproject.toml#18437EliteTK wants to merge 2 commits into
uv.toml and pyproject.toml#18437EliteTK wants to merge 2 commits into
Conversation
4b38fe3 to
1a2856f
Compare
1a2856f to
ae3a28e
Compare
221e22b to
6669578
Compare
Member
|
Can you justify replacing the preview field? I think we'll have |
Member
Author
|
It's not replaced, just hidden and mutually exclusive. More context here: #16452 (comment) and even more context is on discord I believe (from that time). Although as written, the docs still keep the The |
6669578 to
c1b1b11
Compare
c1b1b11 to
87d383c
Compare
Preview features can be configured as a boolean or list of feature names in uv.toml, pyproject.toml, and PEP 723 metadata. These values participate in preview resolution alongside command-line and environment settings. Preserve the deprecated preview spelling, reject configuring both spellings in the same document, and expose the option through settings metadata and the generated schema. Co-authored-by: Tomasz (Tom) Kramkowski <tom@astral.sh> Co-authored-by: Zanie Blue <contact@zanie.dev>
87d383c to
e3f0438
Compare
uv test inventory changesThis PR changes the tests when compared with the latest
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a continuation of the excellent work by @j-helland in #16452 and #17202 and closes #15767.
This PR adds
preview-featurestouv.tomlandpyproject.toml.This field can be set to a boolean or to a list of features.
It is intended to supersede the
previewsetting itself, and conflicts with it.There's a little bit of complexity required to ensure that setting either
previeworpreview-featuresis combined at the right point, but it's also necessary to leave them split to accurately warn when auv.tomlmasks apyproject.tomlin the same directory.Additionally there's complexity involved in making things work with
deny_unknown_fieldsandflatten(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.