bazel: Register Python 3.12 as default toolchain

rules_python 2.x changes DEFAULT_PYTHON_VERSION to 3.14 and ignores
is_default = True from non-root modules. Explicitly register Python 3.12
as the default toolchain in the root MODULE.bazel.

Bug: b/525130277
Change-Id: I324f13ec268f560ab5ccf9e4dfbb95b4c0980379
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/examples/+/517445
GitOrigin-RevId: 8be984f578ad7627f23cea532fb81bff844ce110
diff --git a/MODULE.bazel b/MODULE.bazel
index bc9cea8..1682846 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -80,3 +80,9 @@
     "@pigweed//pw_toolchain/host_clang:host_cc_toolchain_macos",
     dev_dependency = True,
 )
+
+python = use_extension("@rules_python//python/extensions:python.bzl", "python")
+python.toolchain(
+    is_default = True,
+    python_version = "3.12",
+)