Skip to content

test(pypi): verify uv.lock parsing against the rules_py uv cases - #4483

Open
aignas wants to merge 2 commits into
bazel-contrib:mainfrom
aignas:test/uv-lock-rules-py-cases
Open

aignas wants to merge 2 commits into
bazel-contrib:mainfrom
aignas:test/uv-lock-rules-py-cases

Conversation

@aignas

@aignas aignas commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

The uv.lock support in parse_requirements is new, so this checks that it is
robust against the lock file shapes that real projects produce. The uv
end-to-end cases in rules_py each guard a regression that was found with a real
lock file, and the ones that apply to parsing the lock file are ported here as
unit tests:

  • one version split into per-platform records by tool.uv.environments,
  • conflicting dependency groups that pin different versions of a package,
  • wheels without a hash,
  • platform-specific wheels without an sdist,
  • PEP 440 local (+) and epoch (!) versions,
  • a dependency group that enables an extra of its own project,
  • bare linux_<arch> wheel platform tags,
  • the abi3 wheel preference on newer interpreters.

All of them pass without changes to the implementation. Selecting the
dependency groups is left to pip.configure, so these tests only check what the
uv.lock dependency graph makes reachable.

Cover uv.lock shapes exercised by the rules_py uv e2e cases that were not
yet tested here: a single version split into per-platform records,
conflicting dependency groups pinning different versions, hashless wheels,
platform-specific wheels without an sdist, local and epoch versions, a root
extra enabled through a dev group, bare linux_<arch> wheel tags, and abi3
wheel preference on newer interpreters.
Selecting dependency groups, including self references to a project's own
extras, is handled by pip.configure, so the parse_requirements tests only
check what the uv.lock graph makes reachable.
@aignas
aignas requested a review from rickeylev as a code owner November 12, 2026 14:23
@aignas

aignas commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

This PR was prepared by Claude Code (an AI agent) on behalf of the author. The author reviewed the change before it was opened. Review comments will be handled by the author, who may use an agent to draft changes and replies that they review before posting.

This comment was generated by an AI agent and approved by the author.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant