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
diff --git a/examples/bzlmod/MODULE.bazel b/examples/bzlmod/MODULE.bazel
index 0e5c2c8..57e6b7e 100644
--- a/examples/bzlmod/MODULE.bazel
+++ b/examples/bzlmod/MODULE.bazel
@@ -40,14 +40,16 @@
# 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.