chore: upgrade bzlmod example python versions#3728
chore: upgrade bzlmod example python versions#3728aignas wants to merge 3 commits intobazel-contrib:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request upgrades the Python versions in the bzlmod example to 3.11, 3.12, and 3.13, updating toolchains, dependencies, and test targets. The review feedback highlights several inconsistencies in the lockfiles, such as headers referencing incorrect Python versions or tools, and suggests regenerating them to ensure compatibility with the new target versions. A typo in a repository name within a comment was also identified for correction.
| requirements_by_platform = { | ||
| # Default requirements file for needs to explicitly provide the platforms | ||
| "//:requirements_lock_3_11.txt": "linux_*,osx_*", | ||
| "//:requirements_lock_3_13.txt": "linux_*,osx_*", |
There was a problem hiding this comment.
The lockfile requirements_lock_3_13.txt appears to be a rename of the old requirements_lock_3_9.txt. Using lockfile content generated for Python 3.9 with Python 3.13 is likely incorrect and will lead to compatibility issues. All lockfiles should be regenerated for their respective new Python versions.
| # This file is autogenerated by pip-compile with Python 3.10 | ||
| # by the following command: | ||
| # | ||
| # bazel run //:requirements_3_10.update |
There was a problem hiding this comment.
The header in this lockfile is inconsistent with the target version and the tools used in this example. It references Python 3.10 and pip-compile, while the file is intended for Python 3.11 and the example uses uv (as seen in MODULE.bazel). Furthermore, several packages appear to have been downgraded (e.g., alabaster from 0.7.16 to 0.7.13), which is unexpected for an upgrade PR. This lockfile should be regenerated using the correct tools and Python version.
| # This file is autogenerated by pip-compile with Python 3.10 | ||
| # by the following command: | ||
| # | ||
| # bazel run //:requirements_3_10.update |
There was a problem hiding this comment.
| # This file was autogenerated by uv via the following command: | ||
| # bazel run //examples:bzlmod_requirements_3_11_windows.update |
| # ruleset. When the symbol is loaded you can use the rule. | ||
|
|
||
| # The names @pip and @python_39 are values that are repository | ||
| # The names @pip and @python_311 are values that are repository |
There was a problem hiding this comment.
3931c13 to
c613770
Compare
This is preparatory work for #2704.