Skip to content

1.8.0-rc0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 20 Dec 05:42
· 7 commits to main since this release
9a20fc2

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.8.0-rc0")

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 = "7cd5bab76de50f35e2050b6171f3ea8a341d80a562f7b47ef549f6c174cee0af",
    strip_prefix = "rules_python-1.8.0-rc0",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc0/rules_python-1.8.0-rc0.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 = "7cd5bab76de50f35e2050b6171f3ea8a341d80a562f7b47ef549f6c174cee0af",
    strip_prefix = "rules_python-1.8.0-rc0/gazelle",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.0-rc0/rules_python-1.8.0-rc0.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

  • 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_sources in 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_binary compatible 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.default arguments 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
  • chore: remove bcr app settings by @rickeylev in #3370
  • chore: make pypi release workflow perform checkout by @rickeylev in #3371
  • fix(gazelle) Delete python targets with invalid srcs by @yushan26 in #3046
  • revert(pypi): revert the default for pipstar by @aignas in #3373
  • fix: Add linux_riscv64 to _pip_repository_impl by @kxxt in #3350
  • feat: Add libpython QNX platform support by @lalten in #3372
  • build: change gazelle rules_python override to use bazelrc by @rickeylev in #3382
  • gazelle: set min rules_python version as 1.4 by @rickeylev in #3383
  • chore(toolchain): drop all but the latest 3.9 toolchain by @aignas in #3377
  • fix: make CI pass with the next version of Bazel (9.0.0rc1) by @jsing-canva in #3393
  • Add batch_commands to presubmit.yml by @meteorcloudy in #3389
  • fix(runfiles): correct Python runfiles path assumption by @jsing-canva in #3086
  • chore: Bazel 9 is rc now by @alexeagle in #3394
  • chore: update to latest buildifier by @aignas in #3386
  • chore: switch bcr to 8.x instead of last_rc by @aignas in #3395
  • fix(local): Fix local_runtime use with free-threaded python by @laramiel in #3399
  • refactor: defer zip manifest building to execution phase to improve analysis phase performance by @tobyh-canva in #3381
  • fix(pip): allow for different extras for different target platforms by @aignas in #3385
  • chore: make doc building use bootstrap script and venv site packages by @rickeylev in #3403
  • fix: use runfiles symlinks for venv symlink creation to reduce action count by @rickeylev in #3402
  • fix(gazelle): correct runfiles path handling in gazelle_python_manifest test by @timfallmk in #3398
  • tests: set --windows_enable_symlinks in bzlmod example by @rickeylev in #3409
  • docs: Explain why the lock rule has no implicit test target by @martis42 in #3411
  • refactor(gazelle): Generate a modules map per wheel, then merge by @thejcannon in #3415
  • docs: fix markdown by @dizzy57 in #3417
  • feat(toolchain): drop 3.8 and print info level messages about it by @aignas in #3387
  • fix: Avoid C++ toolchain requirement if possible by @fmeum in #2919
  • doc: add documentation to the changelog about the removal of 3.8 by @aignas in #3418
  • fix: make python_headers targets compatible with layering checks by @keith in #3420
  • fix(local) Add api3 targets and additional defines. by @laramiel in #3408
  • chore: start cleaning up 3.9 usage from examples by @aignas in #3419
  • chore: enable disk cache for faster local builds by @rickeylev in #3424
  • chore(bazelrc): fix the update-deleted-packages script by @aignas in #3425
  • chore(toolchain): remove chmod and disable ignore_root_error by @aignas in #3421
  • ci: switch our jobs to mac arm64 by @aignas in #3426
  • docs: enable pipstar for doc building by @rickeylev in #3427
  • fix: add runfiles root for system_python bootstrap by @rickeylev in #3423
  • refactor(pypi): parse entry_points without Python by @aignas in #3429
  • chore: enable pipstar for experimental_index_url users by @aignas in #3428
  • fix(pip): do not add a pip-fallback when there is no sdist by @aignas in #3432
  • build(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #3433
  • refactor(pypi): extract the wheel without python by @aignas in #3430
  • chore: remove extraneous dep from sys_path_order test by @rickeylev in #3435
  • refactor: remove gazelle plugin as dev dependency by @rickeylev in #3436
  • ci: add ci config to test 7 and 8 for bcr like setup by @aignas in #3404
  • feat(pip.parse): limit the target platforms we parse requirements for by @aignas in #3441
  • refactor(core): get_zip_runfiles_path should call startswith less by @aignas in #3442
  • ci: start testing BCR tests with bazel 9 by @aignas in #3443
  • doc: target_platforms by @aignas in #3445
  • chore(bzlmod): assume that we can always mark the extension as reproducible by @aignas in #3444
  • refactor: avoid conflict merging when shared libraries are present by @rickeylev in #3448
  • refactor: add mnemonics to some gazelle and sphinxdocs actions by @tyler-french in #3449
  • fix(pip): Only directly extract .whl files in Bazel >9 by @armandomontanez in #3452
  • feat(toolchains): Add 3.13.10, 3.13.11, 3.14.1, 3.14.2, 3.15.0a2 by @pjjw in #3451
  • chore(pip): Check for whl extract compatibility in internal_config_repo.bzl by @armandomontanez in #3456
  • fix(pip): set better defaults for the new target_platforms attr by @aignas in #3447
  • fix: correctly merge conflicting paths when files (instead of dirs) are being linked by @rickeylev in #3458
  • refactor(repo_utils): create a helper for extracting files by @aignas in #3459
  • refactor: optimize venv building for namespace packages by @rickeylev in #3454
  • chore: add missing py_internal dep to venv_runfiles by @rickeylev in #3462
  • fix: allow pypi packages with empty data attribute by @rickeylev in #3463
  • docs: Fix broken links to bzlmod build_file_generation example by @willstranton in #3464
  • docs: fix link to releases page by @willstranton in #3467
  • refactor: optimize venv creation for nvidia and pkgutil style namespace packages by @rickeylev in #3460
  • fix(pipstar): actually pass the extras down the call stack by @aignas in #3468
  • fix(pipstar): fix whl extraction and flip pipstar=true by @aignas in #3461
  • build(deps): bump bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml from 1.0.0 to 1.1.0 by @dependabot[bot] in #3465
  • chore: update version markers for 1.8 release by @rickeylev in #3472

New Contributors

Full Changelog: 1.6.0-rc0...1.8.0-rc0