Skip to content

Complain more loudly about unknown Dependency Object Specifiers #12638

@Gankra

Description

@Gankra

Summary

This currently does not produce an error or default-visible warning. (It results in a tracing::warn! which is hidden by default):

[dependency-groups]
foo = ["pyparsing"]
bar = [{set-phasers-to = "stun"}]

The set-phasers-to get parsed as an unknown Dependency Object Specifier (DependencyGroupSpecifier::Object), which is a future-compat concept from PEP-735 dependency-groups:

Tools SHOULD error when evaluating or processing unrecognized data in Dependency Groups.

Tools SHOULD NOT eagerly validate the list contents of all Dependency Groups.

This means that in the presence of the (above example), most tools will allow the foo group to be used, and will only error when the bar group is used.

"When the group is used" is a fuzzy concept because we generate lockfiles that are supposed to validate/cover all possible invocations. As such we should probably error when we encounter these, or at least unconditionally warn to stderr!

Platform

all

Version

uv 0.6.11

Python version

No response

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomershelp wantedContribution especially encouraged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions