For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Using Bzlmod
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "1.7.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Using WORKSPACE
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f609f341d6e9090b981b3f45324d05a819fd7a5a56434f849c761971ce2c47da",
strip_prefix = "rules_python-1.7.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0/rules_python-1.7.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Gazelle plugin
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "f609f341d6e9090b981b3f45324d05a819fd7a5a56434f849c761971ce2c47da",
strip_prefix = "rules_python-1.7.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0/rules_python-1.7.0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()What's Changed
- docs: add steps for creating release candidates by @rickeylev in #2687
- fix(toolchain): no chmod on windows when downloading hermetic toolchain by @aignas in #2693
- fix: correctly find runfiles root for symlinks by @lpulley in #2665
- feat: add riscv64 linux support by @kxxt in #2694
- build(deps): bump urllib3 from 2.2.3 to 2.3.0 in /docs by @dependabot[bot] in #2698
- build(deps): bump urllib3 from 2.2.3 to 2.3.0 in /tools/publish by @dependabot[bot] in #2699
- build(deps): bump babel from 2.16.0 to 2.17.0 in /docs by @dependabot[bot] in #2696
- build(deps): bump keyring from 25.4.1 to 25.5.0 in /tools/publish by @dependabot[bot] in #2355
- build(deps): bump django from 4.2.17 to 4.2.20 in /examples/bzlmod_build_file_generation by @dependabot[bot] in #2689
- fix: Correctly resolve macOS SDK paths by @shs96c in #2478
- chore: remove old versions of Python 3.8 by @aignas in #2700
- feat: uv lock rule instead of genrule by @aignas in #2657
- feat(python.toolchain): support file-based default Python version by @vonschultz in #2588
- fix(pypi): output only necessary target_platforms by @aignas in #2710
- refactor(pypi): implement PEP508 compliant marker evaluation by @aignas in #2692
- fix(docs): CHANGELOG "astral" typo by @lpulley in #2715
- build(deps): bump sphinx-reredirects from 0.1.5 to 0.1.6 in /docs by @dependabot[bot] in #2716
- build(deps): bump certifi from 2024.8.30 to 2025.1.31 in /docs by @dependabot[bot] in #2718
- build(deps): bump certifi from 2024.8.30 to 2025.1.31 in /tools/publish by @dependabot[bot] in #2719
- build(deps): bump pygments from 2.18.0 to 2.19.1 in /docs by @dependabot[bot] in #2720
- fix: Fix Python 3.4.x compatibilty with bootstrap (#2709) by @armandomontanez in #2714
- build(deps): bump packaging from 24.1 to 24.2 in /docs by @dependabot[bot] in #2721
- chore: remove semantics.bzl by @rickeylev in #2725
- chore: remove defunct comment about py2 compatibility by @rickeylev in #2724
- feat(pypi/parse_requirements): get dists by version when no hash provied by @Yanpei-Wang in #2695
- fix(toolchains): correctly order the toolchains by @aignas in #2735
- fix: allow warn logging to be disabled via RULES_PYTHON_REPO_DEBUG_VERBOSITY by @mattem in #2737
- fix: run check on interpreter in isolated mode by @mattem in #2738
- fix(pypi): correctly fallback to pip for git direct URLs by @aignas in #2732
- fix: support gazelle generation_mode:update_only by @jbedard in #2708
- fix(pypi): mark the extension reproducible by @aignas in #2730
- feat: allow populating binary's venv site-packages with symlinks by @rickeylev in #2617
- docs: fix a few xrefs by @rickeylev in #2740
- fix: treat ignore_root_user_error either ignored or warning by @mattem in #2739
- fix: Ensure temporary .pyc & .pyo files are excluded from the interpreters repository files by @mattem in #2743
- chore: remove unnecessary DEFAULT_BOOTSTRAP_TEMPLATE global by @rickeylev in #2744
- build(deps): bump jinja2 from 3.1.4 to 3.1.6 in /docs by @dependabot[bot] in #2750
- build(deps): bump absl-py from 2.1.0 to 2.2.2 in /docs by @dependabot[bot] in #2751
- build(deps): bump charset-normalizer from 3.4.0 to 3.4.1 in /docs by @dependabot[bot] in #2752
- build(deps): bump charset-normalizer from 3.4.0 to 3.4.1 in /tools/publish by @dependabot[bot] in #2753
- build(deps): bump jinja2 from 3.1.4 to 3.1.6 in /examples/pip_parse by @dependabot[bot] in #2754
- build(deps): bump cryptography from 43.0.3 to 44.0.1 in /tools/publish by @dependabot[bot] in #2756
- feat(toolchains): create toolchains from locally installed python by @rickeylev in #2742
- fix: run python version call in isolated mode by @mattem in #2761
- fix(pypi): fixes to the marker evaluation and utils by @aignas in #2767
- fix: Prevent absolute path creation in uv lock template by @asa in #2769
- fix: Resolve incorrect platform specific dependency by @ewianda in #2766
- fix(rules): make the srcs trully optional by @aignas in #2768
- refactor(pypi): translate wheel METADATA parsing to starlark by @aignas in #2629
- fix: replace string with modern providers in tests by @comius in #2773
- feat(toolchain): Add new make vars for Python interpreter path compliant with
--no_legacy_external_runfilesby @FrankPortman in #2772 - fix(packaging): Format
METADATAcorrectly if given emptyrequires_fileby @FrankPortman in #2771 - build(deps): bump typing-extensions from 4.12.2 to 4.13.2 in /docs by @dependabot[bot] in #2776
- build(deps): bump urllib3 from 2.3.0 to 2.4.0 in /tools/publish by @dependabot[bot] in #2775
- build(deps): bump urllib3 from 2.3.0 to 2.4.0 in /docs by @dependabot[bot] in #2774
- refactor(bzlmod): stop using 'repo' attr in whl_library by @aignas in #2779
- perf: lazily load gazelle manifest files by @mattem in #2746
- fix(ci): use ubuntu-latest for mypy action by @aignas in #2784
- doc: better document supported platform tiers by @aignas in #2783
- fix(rules): copy_propagating_kwargs() now also copies target_compatible_with by @dws in #2788
- release: 1.4.0 release prep by @rickeylev in #2789
- fix: declare PyInfo as provided by test/binary/library by @layus in #2777
- fix: load target_platforms through the hub by @aignas in #2781
- chore: remove a stray file by @aignas in #2795
- build(deps): bump sphinx-rtd-theme from 3.0.1 to 3.0.2 in /docs by @dependabot[bot] in #2802
- build(deps): bump astroid from 3.3.6 to 3.3.9 in /docs by @dependabot[bot] in #2803
- build(deps): bump packaging from 24.2 to 25.0 in /docs by @dependabot[bot] in #2804
- fix: fixes to prepare for making bootstrap=script the default for Linux by @rickeylev in #2760
- fix: escape more invalid repo string characters by @keith in #2801
- fix: parsing metadata with inline licenses by @keith in #2806
- test(pypi): add a test case for simpleapi html parsing with % by @aignas in #2811
- build: Run pre-commit everywhere by @brandonchinn178 in #2808
- refactor/docs: improve compile_pip_requirements error message and docs by @brandonchinn178 in #2792
- feat: Have
pip_compilegenerate a*.testtarget; deprecate*_testby @dougthor42 in #2812 - fix: try multiple times to get win32 version to handle flakes by @rickeylev in #2814
- refactor: Add log_std(out|err) bools to repo_utils that execute a subprocess by @dougthor42 in #2817
- fix: use the python micro version to parse whl metadata in bzlmod by @aignas in #2793
- fix(pypi): call python --version before marker eval by @aignas in #2819
- docs: add xrefs for local toolchains rules by @rickeylev in #2823
- docs: Improve bazel-runfiles docs by @fmeum in #2824
- revert(pypi): bring back Python PEP508 code with tests by @aignas in #2831
- fix(pypi) backport python_full_version fix to Python by @aignas in #2833
- revert(pypi): use Python for marker eval and METADATA parsing by @aignas in #2834
- feat: implement less/greater operators for string for env marker evaluation by @rickeylev in #2827
- docs: doc version when RULES_PYTHON_ENABLE_PYSTAR was introduced by @rickeylev in #2838
- fix(pypi): handle more URL patterns for requirement sources by @aignas in #2843
- docs: document some of our project styles/conventions by @rickeylev in #2816
- fix: requires_file preserves extras that package depends on by @skongum02 in #2807
- refactor: add rule to do analysis time evaluation of environment markers by @rickeylev in #2832
- py_wheel: always generate zip64-capable wheels by @devtbi in #2711
- feat: allow specifying arbitrary constraints for local toolchains by @rickeylev in #2829
- feat: add an env variable to toggle pipstar by @aignas in #2855
- fix: add target platform to extra exec platforms in analysis tests by @fmeum in #2861
- fix: configure coverage helpers for test exec group by @fmeum in #2857
- fix: fix test analysis error on macOS arm64 by @fmeum in #2860
- refactor: make env marker config available through target and flag by @rickeylev in #2853
- feat: default to bootstrap script for non-windows by @rickeylev in #2858
- fix(pypi): fix a typo in parse_simpleapi_html by @aignas in #2866
- build(deps): bump more-itertools from 10.5.0 to 10.7.0 in /tools/publish by @dependabot[bot] in #2841
- fix(pypi): finish PEP508/PEP440 impl for version matching by @aignas in #2856
- tests: make some analysis tests work for when test's exec platform is required by @fmeum in #2869
- fix(pypi): make the URL/filename extraction from requirement more robust by @aignas in #2871
- feat(pypi): actually start using env_marker_setting by @aignas in #2873
- refactor: make python extension generate platform toolchains by @rickeylev in #2875
- Fix whl_library file path inference by @gholms in #2876
- refactor: consolidate version parsing by @aignas in #2874
- feat: Add support for REPLs by @philsc in #2723
- cleanup: remove unused sanitize_platform_name function by @rickeylev in #2887
- refactor: move inline code strings to top-level constants by @rickeylev in #2886
- dev: add .python-version file so pyenv isn't user/system specific by @rickeylev in #2883
- refactor: have bzlmod pass platforms to python_register_toolchains by @rickeylev in #2884
- sphinxdocs: close repo rule directives by @rickeylev in #2892
- sphinxdocs: make xrefs to bzl:obj in inventories work by @rickeylev in #2894
- sphinxdocs: make xrefs to tag class attributes using attr role work by @rickeylev in #2895
- sphinxdocs: allow unqualified arg/attr name for xref by @rickeylev in #2896
- docs: fix xref to toolchain docs from getting starting by @rickeylev in #2899
- sphinxdocs: allow files to be xref by @rickeylev in #2897
- docs: move devguide to sphinx for more powerful markup by @rickeylev in #2898
- sphinxdocs: make bazel package xrefs work by @rickeylev in #2903
- docs: fix most broken xrefs in changelog by @rickeylev in #2902
- tests: move py_reconfig rules to their own file by @rickeylev in #2900
- docs: fix link to py_reconfig and sh_py_run_test files by @rickeylev in #2901
- sphinxdocs: make Any and object types no-ops to avoid missing xrefs by @rickeylev in #2905
- docs: correct some xrefs, add various missing Bazel external xrefs by @rickeylev in #2907
- docs: ignore warnings about missing external py xrefs by @rickeylev in #2904
- refactor: make bzlmod directly aware of created toolchain repo names by @rickeylev in #2885
- fix: Allow PYTHONSTARTUP to define variables by @philsc in #2911
- docs: fix some more bad xrefs by @rickeylev in #2910
- refactor: make bzlmod create host repos for toolchains by @rickeylev in #2888
- refactor: remove unused target_platforms hub_repository attr by @aignas in #2912
- build(deps): bump setuptools from 65.6.3 to 78.1.1 in /examples/bzlmod by @dependabot[bot] in #2914
- refactor: make bzlmod pass platform mapping to host repo creation by @rickeylev in #2889
- docs: fix xrefs in by @rickeylev in #2917
- refactor: explicitly define host platform ordering by @rickeylev in #2890
- docs: generate docs for py_common, PyInfoBuilder APIs by @rickeylev in #2920
- refactor: rename host_toolchain rule to host_compatible_python_repo by @rickeylev in #2926
- docs/refactor: Use python.defaults, not is_default by @vonschultz in #2924
- fix: Normalize main script path in Python bootstrap by @mering in #2925
- refactor: also rename host toolchain impl function name by @rickeylev in #2930
- tests: refactor py_reconfig rules so less boilerplate is needed to add attrs by @rickeylev in #2933
- feat: add shebang attribute on py_console_script_binary by @chrisirhc in #2867
- fix: update the stub type alias names by @kaycebasques in #2929
- refactor: reimplement writing namespace pkgs in Starlark by @aignas in #2882
- cleanup(pycross): remove the partially migrated code by @aignas in #2906
- refactor(pypi): return a list from parse_requirements by @aignas in #2931
- fix: symlink root-level python files to the venv by @aignas in #2908
- docs: split PyPI docs up and add more by @aignas in #2935
- refactor: change site_packages_symlinks to venv_symlinks by @rickeylev in #2939
- docs: fix sphinxdocs mis-redirect by @rickeylev in #2940
- feat: allow custom platform when overriding by @rickeylev in #2880
- feat: Support constraints in pip_compile by @vihangm in #2916
- fix(pypi): allow pip_compile to work with read-only sources by @rbeasley-avgo in #2712
- feat(uv): handle credential helpers and .netrc by @aignas in #2872
- fix(pypi): correctly aggregate the requirements files by @aignas in #2932
- fix(pypi): inherit proxy env variables in compile_pip_requirements test by @herewasmike in #2941
- feat: add persistent worker for sphinxdocs by @kaycebasques in #2938
- fix: Updating setuptools to patch CVE-2025-47273 by @aaronmaxlevy in #2955
- feat: data and pyi files in the venv by @aignas in #2936
- fix(pypi): Only show index_url_overrides warnings when they are needed by @thirtyseven in #2967
- revert: change default bootstrap back to system_python by @rickeylev in #2968
- fix: grammar in an error message by @benjaminp in #2971
- refactor: Add missing uses of DefaultInfo by @keith in #2972
- docs: fix typo in toolchains.md example code by @honglooker in #2970
- chore: prepare for 1.5 release by @rickeylev in #2973
- fix: support pre-release versions and add new toolchain versions by @aignas in #2969
- chore: Fixup some typos in BuildKite job names by @dougthor42 in #2977
- refactor: Remove unused CC_TOOLCHAIN definition by @katre in #2981
- Fix argument name typo by @keith in #2984
- build(deps): bump certifi from 2025.1.31 to 2025.6.15 in /tools/publish by @dependabot[bot] in #2999
- build(deps): bump certifi from 2025.1.31 to 2025.6.15 in /docs by @dependabot[bot] in #3000
- build(deps): bump requests from 2.32.3 to 2.32.4 in /docs by @dependabot[bot] in #2965
- fix: use platform_info.target_settings in toolchain aliases by @aignas in #3001
- refactor(gazelle) Types for exposed members of
python.ParserOutputare now all public by @yushan26 in #2959 - feat(pypi): pip.defaults API for customizing pipstar 1/n by @aignas in #2987
- feat(pypi): pip.defaults API for customizing repo selection 2/n by @aignas in #2988
- fix(toolchains): use posix-compatible exec -a alternative by @rickeylev in #3010
- build(deps): bump urllib3 from 2.4.0 to 2.5.0 in /tools/publish by @dependabot[bot] in #3008
- feat: support arbitrary target_settings in our platforms 3/n by @aignas in #2990
- docs: fix various typos and improve grammar by @rickeylev in #3015
- feat(gazelle): For package mode, resolve dependencies when imports are relative to the package path by @yushan26 in #2865
- fix: Fix bazel vendor support for requirements with environment markers by @armandomontanez in #2997
- fix(pypi): namespace_pkgs should pass correct arguments by @aignas in #3026
- fix: work around version parsing by only parsing if site-packages is enabled by @rickeylev in #3031
- docs,tests: Clarify how py_wheel.strip_path_prefixes works; add test case by @dougthor42 in #3027
- feat(gazelle): Add type-checking only dependencies to pyi_deps by @amartani in #3014
- fix: delete BUILD et al files from pypi sourced dependencies by @rickeylev in #3029
- fix(gazelle) Fix dependency added as both deps and pyi_deps by @amartani in #3036
- fix(gazelle) Register pyi_deps as ResolveAttrs by @amartani in #3037
- docs: Typo in gazelle/README.md by @jklukas in #3040
- feat(gazelle) Remove entry point file requirements when generating rules by @yushan26 in #2998
- fix: Don't let deprecated test targets get matched by '...' by @robinlinden in #3045
- fix: add py.typed to runfiles py_wheel so it gets packaged by @aaronsky in #3041
- docs: Add note about Python 3.9 to CHANGELOG.md by @thirtyseven in #3052
- fix: Updating Python toolchains to patch CVE-2025-47273 by @aaronmaxlevy in #3053
- docs: doc expectations of ai-assisted contributions by @rickeylev in #3051
- fix(local-toolchains): don't watch non-existent include directory by @rickeylev in #3048
- build(deps): bump urllib3 from 2.4.0 to 2.5.0 in /docs by @dependabot[bot] in #3042
- fix(pypi): only generate namespace package shims if implicit namespaces are disabled by @rickeylev in #3059
- feat: Add windows arm64 python toolchains by @AustinSchuh in #3062
- refactor(toolchains): better sha256 printing helper by @aignas in #3028
- refactor(pypi): move the platform config to MODULE.bazel by @aignas in #3064
- fix(pypi): correctly handle custom names in pipstar platforms by @aignas in #3054
- tests(pypi): add tests for namespace shims generation by @rickeylev in #3066
- build(deps): bump pygments from 2.19.1 to 2.19.2 in /docs by @dependabot[bot] in #3019
- build(deps): bump charset-normalizer from 3.4.1 to 3.4.2 in /docs by @dependabot[bot] in #3018
- fix: parsing local version with digit followed by non-digits by @rickeylev in #3032
- feat(pypi): generate filegroup with all extracted wheel files by @rickeylev in #3011
- docs: add whl_from_dir to dev guide docs by @rickeylev in #3067
- fix(toolchains): fix the URLs and sha256 values by @aignas in #3070
- chore: Switch back to smacker/go-tree-sitter by @dougthor42 in #3069
- build(deps): bump charset-normalizer from 3.4.1 to 3.4.2 in /tools/publish by @dependabot[bot] in #3020
- build(deps): bump pygments from 2.18.0 to 2.19.2 in /tools/publish by @dependabot[bot] in #3021
- ci: use Ubuntu 22.04 by @aignas in #3083
- fix(gazelle) Update gazelle to properly process multi-line python imports by @yushan26 in #3077
- feat(gazelle): Gazelle plugin generates py_proto_library by @shaldengeki in #3057
- feat(gazelle): Add
include_pytest_conftestannotation by @dougthor42 in #3080 - docs: tell how to emulate dependency groups with pip-compile by @rickeylev in #3089
- chore: update python toolchains by @aignas in #3074
- feat: replace /bin/bash with /usr/bin/env bash by @fionera in #3087
- build(deps): bump certifi from 2025.6.15 to 2025.7.14 in /docs by @dependabot[bot] in #3092
- build(deps): bump certifi from 2025.6.15 to 2025.7.14 in /tools/publish by @dependabot[bot] in #3095
- fix: support debian multiarch with local toolchains by @rickeylev in #3100
- refactor(gazelle_manifest): print the wrong hash when encountered by @alexeagle in #3103
- feat(gazelle):
python_proto_naming_conventiondirective controlspy_proto_librarynaming by @shaldengeki in #3093 - fix(pypi): expose pypi packages only common to all python versions by @dotoleeoak in #3107
- fix: normalize stub_path in repl.bzl by @jpwoodbu in #3104
- build(deps): bump typing-extensions from 4.13.2 to 4.14.1 in /docs by @dependabot[bot] in #3094
- fix(gazelle): Do not resolve absolute imports to sibling modules by @amartani in #3106
- fix(pypi): show overridden index urls in pypi download error by @dotoleeoak in #3130
- chore: Remove aliases in //docs by @dougthor42 in #3125
- fix(gazelle): Rename experimental_allow_relative_imports directive to follow convention by @dougthor42 in #3128
- test: Print REPL error message during test failures by @philsc in #3124
- docs(gazelle): Start migrating Gazelle docs to ReadTheDocs, part 1 of ~5 by @dougthor42 in #3129
- feat(repl): add tab completion on platforms with readline support by @jpwoodbu in #3114
- docs(gazelle): Migrate Gazelle docs to ReadTheDocs, part 2/5: installation and usage by @dougthor42 in #3132
- docs(gazelle): Migrate Gazelle docs to ReadTheDocs, part 3/5: annotations by @dougthor42 in #3137
- docs(gazelle): Migrate Gazelle docs to ReadTheDocs, part 4/5: directives by @dougthor42 in #3139
- docs(gazelle): Migrate Gazelle docs to ReadTheDocs, part 5/5: target types by @dougthor42 in #3147
- docs(gazelle): Migrate Gazelle docs to ReadTheDocs, part 6/5: development by @dougthor42 in #3149
- fix: use "command -v" to find interpreter in $PATH by @malt3 in #3150
- docs(pypi): clarify when extra_hub_aliases was added to workspace by @rickeylev in #3152
- build(deps): bump nh3 from 0.2.18 to 0.3.0 in /tools/publish by @dependabot[bot] in #3141
- build(deps): bump certifi from 2025.7.14 to 2025.8.3 in /docs by @dependabot[bot] in #3143
- build(deps): bump certifi from 2025.7.14 to 2025.8.3 in /tools/publish by @dependabot[bot] in #3145
- fix: Fix whl_library in bazel vendor mode by @omar-droubi in #3096
- docs(gazelle): Use definition lists instead of bullets for Gazelle docs by @dougthor42 in #3154
- chore(toolchains): start pulling toolchains from 20250808 release by @aignas in #3116
- build(deps): bump snowballstemmer from 2.2.0 to 3.0.1 in /docs by @dependabot[bot] in #3144
- fix(core): do not assume rules_python runtime by @aignas in #3134
- chore(deps): upgrade bazel-skylib to 1.8.1 by @aignas in #3118
- fix(pypi): reuse select dicts for constructing the env by @aignas in #3108
- fix(pypi): support properly installing sdists via pypi without index by @aignas in #3115
- feat(pypi): add a standards compliant python_tag creator by @aignas in #3110
- doc: changelog cherry-picks for 1.5.2 by @aignas in #3158
- docs(toolchains): set dev_dependency=True on repo rule invocation by @honglooker in #3127
- docs: various howto guides by @rickeylev in #3157
- docs: move changelog note to 1.5.3 section by @rickeylev in #3163
- docs: link to PyRuntimeInfo and mention it has more than example shows by @rickeylev in #3170
- build(deps): bump absl-py from 2.2.2 to 2.3.1 in /docs by @dependabot[bot] in #3167
- build(deps): bump requests from 2.32.3 to 2.32.4 in /tools/publish in the pip group across 1 directory by @dependabot[bot] in #3169
- build(deps): bump docutils from 0.21.2 to 0.22 in /tools/publish by @dependabot[bot] in #3168
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #3165
- build(deps): bump astroid from 3.3.9 to 3.3.11 in /docs by @dependabot[bot] in #3164
- feat(pypi): implement a new whl selection algorithm by @aignas in #3111
- fix: bootstrapping script to not use multiline f-strings by @jacky8hyf in #3175
- docs: add 1.4.2 changelog by @honglooker in #3173
- fix(local_runtime): Improve local_runtime usability in macos / windows by @laramiel in #3148
- docs: Fix docs for gazelle usage by @brandonchinn178 in #3182
- feat(pypi): incrementally build platform configuration by @aignas in #3112
- fix(local_runtime): Search for libs in sys._base_executable when available. by @laramiel in #3178
- docs: tell how to do and request patch releases/backports by @rickeylev in #3185
- fix(pypi): pull fewer wheels with experimental_index_url by @aignas in #3058
- feat(pypi): builder for netrc and auth_patterns by @aignas in #3136
- refactor: Use the linkstamps from linker_inputs instead of from cc_linking_context for to support upcoming CcInfo changes by @comius in #3075
- chore(pypi): remove unused config setting code by @aignas in #3065
- deps(gazelle): upgrade rules_go to remove patching of tree-sitter by @jbedard in #3179
- fix(pypi): correctly handle different package versions by @aignas in #3186
- style: Print coverage return codes in verbose mode by @phst in #3190
- fix(py_wheel): add directories in deterministic order by @jwnimmer-tri in #3194
- feat: freethreaded support for the builder API by @aignas in #3063
- docs: correctly spell release in devguide by @honglooker in #3201
- fix(toolchains): Add Xcode repo env vars to local_runtime_repo for better cache invalidation by @pennig in #3203
- docs: update for 1.6 release by @rickeylev in #3205
- fix(bootstrap): handle when runfiles env vars don't point to current binary's runfiles by @rickeylev in #3192
- docs: fix a couple typos in the changelog by @rickeylev in #3208
- chore: release helper tool by @rickeylev in #3206
- docs: fix changelog header anchors by @rickeylev in #3207
- fix(gazelle): Do not build proto targets with default Gazelle by @dougthor42 in #3216
- chore: create workflow to check the do-not-merge label by @rickeylev in #3213
- docs: Add 1.5.4 release notes to changelog by @rickeylev in #3221
- build(deps): bump requests from 2.32.4 to 2.32.5 in /tools/publish by @dependabot[bot] in #3214
- docs: tell how to push one tag; that rc start with n=0 by @rickeylev in #3222
- build(deps): bump typing-extensions from 4.14.1 to 4.15.0 in /docs by @dependabot[bot] in #3212
- build(deps): bump requests from 2.32.4 to 2.32.5 in /docs by @dependabot[bot] in #3211
- cleanup: remove support for extra actions by @comius in #3210
- build(deps): bump docutils from 0.21.2 to 0.22 in /docs by @dependabot[bot] in #3166
- chore: add AGENTS.md to help AI agents work with rules_python by @rickeylev in #3227
- build(deps): bump rich from 13.9.4 to 14.1.0 in /tools/publish by @dependabot[bot] in #3230
- build(deps): bump charset-normalizer from 3.4.2 to 3.4.3 in /tools/publish by @dependabot[bot] in #3231
- chore: allow release workflow to be manually run and skip pypi upload by @rickeylev in #3232
- chore: make release tool auto detect next version by @rickeylev in #3219
- build(deps): bump cryptography from 44.0.1 to 45.0.7 in /tools/publish by @dependabot[bot] in #3235
- build(deps): bump jeepney from 0.8.0 to 0.9.0 in /tools/publish by @dependabot[bot] in #3234
- build(deps): bump keyring from 25.5.0 to 25.6.0 in /tools/publish by @dependabot[bot] in #3236
- build(deps): bump importlib-metadata from 8.5.0 to 8.7.0 in /tools/publish by @dependabot[bot] in #3237
- refactor(gazelle): report missing BUILD_WORKSPACE_DIRECTORY key more directly by @ctcjab in #3240
- chore(deps): bump rules_cc to 0.1.5 by @aignas in #3238
- fix(sphinxdocs): add retry logic when exit code 2 occurs by @rickeylev in #3241
- fix(system_python): write import paths to generated file instead of using PYTHONPATH by @rickeylev in #3242
- refactor(pypi): split out a hub_builder helper from the extension code by @aignas in #3243
- chore: add GEMINI.md, have it load AGENTS.md by @rickeylev in #3246
- docs: fix pr doc builds by removing external_version_warning plugin by @rickeylev in #3244
- refactor: migrate tests to use hub_builder instead of full integration by @aignas in #3247
- build(deps): bump zipp from 3.20.2 to 3.23.0 in /tools/publish by @dependabot[bot] in #3253
- build(deps): bump more-itertools from 10.7.0 to 10.8.0 in /tools/publish by @dependabot[bot] in #3254
- feat: allow registering arbitrary settings for py_binary transitions by @rickeylev in #3248
- fix: ensure the stage1 bootstrap is executable by @EdSchouten in #3258
- fix: don't call Args.add() with an integer by @EdSchouten in #3259
- docs: update changelog for config_settings attribute by @rickeylev in #3257
- chore: add agents guidance for creating bzl_library targets by @rickeylev in #3264
- docs: improve whl_library documentation by @baxelrod-bdai in #3266
- refactor: use common_labels.bzl for labels used across files by @rickeylev in #3263
- fix(pypi): select the lowest available libc version by default by @aignas in #3255
- tests: add non-blocking ci config for bazel rolling by @rickeylev in #3272
- fix: venv site packages with pkgutil packages by @rickeylev in #3268
- build(deps): bump pycparser from 2.22 to 2.23 in /tools/publish by @dependabot[bot] in #3271
- build(deps): bump cffi from 1.17.1 to 2.0.0 in /tools/publish by @dependabot[bot] in #3270
- build: remove no-op _native_rules_allowlist by @mai93 in #3275
- build(deps): bump pkginfo from 1.10.0 to 1.12.1.2 in /tools/publish by @dependabot[bot] in #3229
- tests: make py_cc_toolchain test of headers/includes work with Bazel 9 by @rickeylev in #3276
- chore(docs): remove duplicate bzlmod guidance by @alexeagle in #3278
- chore: remove non-toolchain runtime resolution logic. by @gregestren in #3280
- feat(toolchains): ABI3 Python headers target by @nicholasjng in #3274
- docs: move 1.6.3 related changelog by @aignas in #3284
- refactor: read migrated native flags through a centralized accessor function by @gregestren in #3290
- build(deps): bump docutils from 0.21.2 to 0.22.2 in /docs by @dependabot[bot] in #3287
- build(deps): bump jaraco-functools from 4.1.0 to 4.3.0 in /tools/publish by @dependabot[bot] in #3288
- docs: add example for a complex multi-platform pypi configuration by @rickeylev in #3292
- feat(runfiles): support for --incompatible_compact_repo_mapping_manifest by @jklukas in #3277
- chore: cleanup bazel flags related to bazel 6 or below by @aignas in #3282
- refactor: rename symbols in re-exports by @aignas in #3300
- chore: use python.defaults to set rules_python default python version by @rickeylev in #3301
- docs: fix spelling of venvs_site_packages flag in changelog by @rickeylev in #3302
- fix(uv): make uv lock rule work with platform python runtime by @rickeylev in #3303
- docs: add config bzlmod extension to docs by @rickeylev in #3305
- fix: handle urls without release id format by @rickeylev in #3306
- build(deps): bump markupsafe from 3.0.2 to 3.0.3 in /docs by @dependabot[bot] in #3307
- build(deps): bump pyyaml from 6.0.2 to 6.0.3 in /docs by @dependabot[bot] in #3308
- build(deps): bump docutils from 0.22 to 0.22.2 in /tools/publish by @dependabot[bot] in #3289
- feat(toolchains): let local toolchains point to a label by @rickeylev in #3304
- fix(toolchains): add musl list of freethreaded runtimes (workspace) by @rickeylev in #3310
- tests: add tests to verify toolchain registration by @rickeylev in #3313
- refactor: remove Google-specific stubs by @oprypin in #3316
- fix: wrong value of
has_py3_only_sourcesin the PyInfo constructor by @oprypin in #3315 - fix(pip): do not use experimental_index_url for publish_deps by @aignas in #3311
- fix(toolchains): correctly register musl/freethreaded toolchains for workspace by @rickeylev in #3314
- chore: reject py2 runtimes and remove usages of ctx.fragments.py.disable_py2 by @mai93 in #3319
- feat(pypi): enable pipstar by default by @aignas in #3225
- docs(pipstar): add more docs to make it ready for release by @aignas in #3323
- build(deps): bump markdown-it-py from 3.0.0 to 4.0.0 in /docs by @dependabot[bot] in #3326
- build(deps): bump certifi from 2025.8.3 to 2025.10.5 in /docs by @dependabot[bot] in #3327
- build(deps): bump certifi from 2025.8.3 to 2025.10.5 in /tools/publish by @dependabot[bot] in #3328
- build(deps): bump markdown-it-py from 3.0.0 to 4.0.0 in /tools/publish by @dependabot[bot] in #3329
- feat(toolchains): Add 3.14.0 by @Ahajha in #3330
- fix(venv): group venv prefixes by path component, not raw path by @rickeylev in #3333
- feat(pypi): support aarch64 windows on pipstar by @aignas in #3226
- feat(toolchains): Add latest Python versions by @Ahajha in #3336
- fix(rules): make
py_console_script_binarycompatible with symbolic macros by @janwinkler1 in #3195 - fix(venv): symlink shared libraries directly by @rickeylev in #3331
- fix(venv): include pth files at the root of the site-packages folder by @aignas in #3340
- internal: make release to chdir before looking for version markers by @rickeylev in #3342
- chore: release 1.7 prep by @rickeylev in #3341
- test(venv): functional test for pth files by @aignas in #3343
- docs: Fix GitHub PR links by @thejcannon in #3346
- build: Starlarkify python flags by @mai93 in #3334
- doc: Fix
pip.defaultarguments in multi-platform example by @hartikainen in #3358 - chore(toolchain): use the last build and add 3.15.0a1 by @aignas in #3357
- fix(doc): fix the release notes for the starlarkification of the flags by @aignas in #3361
- chore: switch to use publish-to-bcr workflow by @rickeylev in #3359
- chore: fix create_archive_and_notes to ignore release tool markers by @rickeylev in #3355
- chore: make gazelle bcr tests compatible with bcr presubmit environment by @rickeylev in #3365
- chore: fix release workflow by @rickeylev in #3366
- Merge main -> release/1.7 by @rickeylev in #3369
New Contributors
- @Yanpei-Wang made their first contribution in #2695
- @asa made their first contribution in #2769
- @FrankPortman made their first contribution in #2772
- @dws made their first contribution in #2788
- @layus made their first contribution in #2777
- @brandonchinn178 made their first contribution in #2808
- @skongum02 made their first contribution in #2807
- @devtbi made their first contribution in #2711
- @mering made their first contribution in #2925
- @kaycebasques made their first contribution in #2929
- @vihangm made their first contribution in #2916
- @rbeasley-avgo made their first contribution in #2712
- @herewasmike made their first contribution in #2941
- @aaronmaxlevy made their first contribution in #2955
- @thirtyseven made their first contribution in #2967
- @benjaminp made their first contribution in #2971
- @katre made their first contribution in #2981
- @jklukas made their first contribution in #3040
- @robinlinden made their first contribution in #3045
- @aaronsky made their first contribution in #3041
- @shaldengeki made their first contribution in #3057
- @fionera made their first contribution in #3087
- @dotoleeoak made their first contribution in #3107
- @jpwoodbu made their first contribution in #3104
- @malt3 made their first contribution in #3150
- @omar-droubi made their first contribution in #3096
- @jacky8hyf made their first contribution in #3175
- @jwnimmer-tri made their first contribution in #3194
- @pennig made their first contribution in #3203
- @ctcjab made their first contribution in #3240
- @baxelrod-bdai made their first contribution in #3266
- @mai93 made their first contribution in #3275
- @gregestren made their first contribution in #3280
- @Ahajha made their first contribution in #3330
- @janwinkler1 made their first contribution in #3195
- @thejcannon made their first contribution in #3346
- @hartikainen made their first contribution in #3358
Full Changelog: 1.3.0...1.7.0