From eb3414026f8dd5f6d057a7ee571a97b834380f3b Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Wed, 4 Mar 2026 04:37:46 -0500 Subject: [PATCH] Enable free-threaded Python 3.14t as the default platform. Use bazelrc flags (aspect_rules_py interpreter:freethreaded and rules_python py_freethreaded) instead of a custom platform to select the free-threaded interpreter and cp314t wheels. Blocked on upstream issues before tests will pass: - google/re2#602: no cp314t wheels published for google-re2 Co-Authored-By: Claude Opus 4.6 (1M context) --- .bazelrc | 4 ++++ MODULE.bazel | 1 + 2 files changed, 5 insertions(+) diff --git a/.bazelrc b/.bazelrc index 649fed5..e93351c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -46,3 +46,7 @@ build --@pypi//venv=dev # Ruff linting via aspect_rules_lint build --aspects=//tools/bzl:linters.bzl%ruff build --@aspect_rules_lint//lint:fail_on_violation + +# Use free-threaded Python 3.14t +build --@aspect_rules_py//py/private/interpreter:freethreaded=true +build --@rules_python//python/config_settings:py_freethreaded=yes diff --git a/MODULE.bazel b/MODULE.bazel index 876b157..9694206 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -8,6 +8,7 @@ register_toolchains("//tools/bzl:python_toolchain_toolchain") # --- Core dependencies --- bazel_dep(name = "bazel_skylib", version = "1.9.0") +bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "rules_python", version = "1.9.0") bazel_dep(name = "rules_go", version = "0.60.0") bazel_dep(name = "gazelle", version = "0.47.0")