From 2b6308c1b5cb4f069943e37fcedb13c423d79803 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 30 Oct 2024 16:27:07 -0700 Subject: [PATCH] tests: don't restrict python versions in bzlmod example (#2362) 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 https://github.com/bazelbuild/rules_python/issues/2361 Fixes https://github.com/bazelbuild/bazel-central-registry/issues/3056 --- examples/bzlmod/MODULE.bazel | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/bzlmod/MODULE.bazel b/examples/bzlmod/MODULE.bazel index 0e5c2c8a2..57e6b7e7b 100644 --- a/examples/bzlmod/MODULE.bazel +++ b/examples/bzlmod/MODULE.bazel @@ -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.