Repository navigation
refactor(examples): replace requirements.txt lockfiles with uv.lock - #4323
Merged
Merged
Conversation
Using `requirements.txt` lockfiles requires maintaining separate per-platform and per-Python-version files (such as `requirements_lock_3_*.txt` and `requirements_windows_*.txt`). Native `uv.lock` files are cross-platform and support multiple Python versions in a single lockfile. Configure `lock` targets in `examples/bzlmod`, `gazelle/examples/bzlmod_build_file_generation`, and `sphinxdocs` to generate `uv.lock`, set `requires-python` in their `pyproject.toml` files, and switch `pip.parse` calls to use `uv_lock`. * Also bumps `rules_python` in `sphinxdocs` and Gazelle example `MODULE.bazel` files so `pip.parse(uv_lock)` is supported, and updates Gazelle manifests and test wheel versions for the regenerated lockfiles.
aignas
approved these changes
Oct 23, 2026
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.
Using
requirements.txtlockfiles requires maintaining separateper-platform and per-Python-version files (such as
requirements_lock_3_*.txtandrequirements_windows_*.txt). Nativeuv.lockfiles are cross-platform and support multiple Python versionsin a single lockfile.
Configure
locktargets inexamples/bzlmod,gazelle/examples/bzlmod_build_file_generation, andsphinxdocstogenerate
uv.lock, setrequires-pythonin theirpyproject.tomlfiles, and switch
pip.parsecalls to useuv_lock.rules_pythoninsphinxdocsand Gazelle exampleMODULE.bazelfiles sopip.parse(uv_lock)is supported, andupdates Gazelle manifests and test wheel versions for the regenerated
lockfiles.