diff --git a/README.md b/README.md index bd5d90d72..7aeab4097 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,20 @@ Built-in rules for creating optimized container images: bazel_dep(name = "aspect_rules_py", version = "1.11.2") ``` +### Requirements + +The minimum supported Python version is **3.10**. The launcher, test runners, and build +tools that run under your configured interpreter use 3.10 syntax, and CI only exercises +3.10 and newer. Older interpreters can still be fetched via `interpreters.configure()`, +but `py_binary` and `py_test` targets will fail at startup on them. + +Some `uv` features need newer versions: + +| Feature | Python | +| ----------------------------------------------------------------------------------------------------------------------- | ------ | +| Free-threaded interpreters (`freethreaded = True`), [first shipped in CPython 3.13](https://peps.python.org/pep-0703/) | 3.13+ | +| `pyproject.toml` parsing in sdist native-dependency detection (needs stdlib `tomllib`) | 3.11+ | + ### Quick Start Load rules from `aspect_rules_py` in your `BUILD` files: diff --git a/docs/interpreter.md b/docs/interpreter.md index c3c9e15e1..e3e9cc74b 100644 --- a/docs/interpreter.md +++ b/docs/interpreter.md @@ -14,8 +14,10 @@ are discovered automatically from PBS release artifacts and cached in your it — no repinning, no manifest regeneration. **No editorial decisions.** We don't decide which Python versions you can use. -Any version published in a PBS release is available. Need Python 3.8? Add an -older release date that includes it. +Any version published in a PBS release is available. Need a version that newer +releases dropped? Add an older release date that includes it. Note that the +rules themselves require Python 3.10 or newer at runtime (see +[Requirements](../README.md#requirements)). **Windows and cross-platform support.** 9 platforms are registered out of the box, including Windows (x86_64, aarch64, i686), Linux (glibc and musl), and @@ -65,7 +67,7 @@ interpreters.configure( ) interpreters.toolchain(python_version = "3.12") -interpreters.toolchain(python_version = "3.8") # Resolved from 20241002 +interpreters.toolchain(python_version = "3.10") # Resolved from 20241002 once newer releases drop it use_repo(interpreters, "python_interpreters") register_toolchains("@python_interpreters//:all") diff --git a/pyproject.toml b/pyproject.toml index eb142bf1f..c1e9870f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dev-dependencies = [ ] [tool.ruff] -target-version = "py39" +target-version = "py310" extend-exclude = [ # Intentionally unparsable .py-as-data fixture. "py/tests/py-venv-multi-exec/broken_data.py",