Skip to content

Commit

Permalink
tests: don't restrict python versions in bzlmod example (#2362)
Browse files Browse the repository at this point in the history
Under Bazel 8, the bzlmod example is failing because newer versions of
some dependencies
request Python 3.8 to be available.

To fix, just comment out the restriction in the example. The example has
a somewhat
large dependency footprint, so enforcing this restriction seems
untenable. The config is
left commented out so users can discover the feature.

Fixes #2361
Fixes bazelbuild/bazel-central-registry#3056
  • Loading branch information
rickeylev authored Oct 30, 2024
1 parent f40038e commit 2b6308c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ python.toolchain(
# One can override the actual toolchain versions that are available, which can be useful
# when optimizing what gets downloaded and when.
python.override(
available_python_versions = [
"3.10.9",
"3.9.18",
"3.9.19",
# The following is used by the `other_module` and we need to include it here
# as well.
"3.11.8",
],
# NOTE: These are disabled in the example because transitive dependencies
# require versions not listed here.
# available_python_versions = [
# "3.10.9",
# "3.9.18",
# "3.9.19",
# # The following is used by the `other_module` and we need to include it here
# # as well.
# "3.11.8",
# ],
# Also override the `minor_mapping` so that the root module,
# instead of rules_python's defaulting to the latest available version,
# controls what full version is used when `3.x` is requested.
Expand Down

0 comments on commit 2b6308c

Please sign in to comment.