2.3.0-rc0
Pre-release
Pre-release
·
149 commits
to main
since this release
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 = "2.3.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 = "5ca87b04971e29b6bf5cd22c6b6581530291893eb31870d75bc46d0f7dd38386",
strip_prefix = "rules_python-2.3.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc0/rules_python-2.3.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 = "5ca87b04971e29b6bf5cd22c6b6581530291893eb31870d75bc46d0f7dd38386",
strip_prefix = "rules_python-2.3.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc0/rules_python-2.3.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
- chore: generate release changelog from news entries by @rickeylev in #3827
- fix(coverage): skip lcov report when no data was collected by @maxbirkner in #3832
- fix(pypi): respect empty envsubst expansion in experimental_index_url by @kriscfoster in #3828
- refactor(pypi): don't use Python to patch wheels by @aignas in #3808
- feat(py_info): expose VenvSymlinkEntry and VenvSymlinkKind as public APIs by @rickeylev in #3835
- doc: merge news into generated changelog by @rickeylev in #3836
- ci: enable bazel-diff by @rickeylev in #3838
- fix: run bazel-diff in cquery mode under bazelci by @rickeylev in #3839
- ci: disable bazel-diff due to platform compatibility conflicts by @rickeylev in #3840
- chore: warn on implicit init.py creation by @rickeylev in #3841
- fix(bootstrap): use retry loop for win32 version lookup in site init template by @rickeylev in #3842
- fix(rules): disambiguate slash target venv outputs by @gleyba in #3845
- chore: automate releases by @rickeylev in #3833
- build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #3843
- chore: remove accidentally committed release automation plan by @rickeylev in #3846
- feat: unified pypi hub repository by @rickeylev in #3837
- feat(pypi): support importing uv.lock file by @aignas in #3785
- chore: add agent rule to base new branches on upstream/main by @rickeylev in #3849
- build(ci): consolidate PR guardrails and block draft files by @rickeylev in #3859
- refactor: use gazelle for bzl_library management by @rickeylev in #3852
- fix(ci): use --repo flag in gh pr diff to avoid checkout by @rickeylev in #3861
- feat: stop using chmod on Bazel 8.6+ by @aignas in #3855
- ci: make pr-metadata-check run on PR body edit by @rickeylev in #3862
- chore(pypi): cleanup unused code by @aignas in #3864
- chore(release): correct version tagging and improve promotion flow by @rickeylev in #3866
- chore(release): add dry-run to release tool prepare command by @rickeylev in #3869
- chore(release): reuse existing PRs and avoid early exit in prep tool by @rickeylev in #3870
- chore(release): use force push and clean up git helpers in prep tool by @rickeylev in #3873
- Prepare release v2.2.0 by @github-actions[bot] in #3874
- chore(release): fix release label consistency in workflows and templates by @rickeylev in #3876
- fix: avoid stage1 bootstrap stdlib shadowing by @gleyba in #3854
- build(deps): bump bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml from 1.1.0 to 1.4.1 by @dependabot[bot] in #3822
- chore(release): support custom remote in create-release-branch and refactor by @rickeylev in #3877
- chore(release): refactor create-rc and handle existing remote release branch by @rickeylev in #3879
- chore(release): various fixes to release tool and workflows by @rickeylev in #3880
- feat(pypi): add pip.dep to declare abstract pypi dependencies by @rickeylev in #3850
- chore(release): refactor process-backports and various release tool fixes by @rickeylev in #3881
- chore(release): factor code, make testable, clarify workflow names by @rickeylev in #3882
- chore(release): pass missing --remote argument to release workflows by @rickeylev in #3883
- chore(release): enable execution in process-backports workflow by @rickeylev in #3884
- chore(release): release automation fixes and refactoring by @rickeylev in #3885
- fix: use locale-neutral Windows ACL for build data by @alex-the-third in #3887
- feat(py_test): add opt-in safeguard against accidental no-op tests by @thirtyseven in #3825
- feat: enable pyproject.toml as single source of truth for Python version by @golithe in #3514
- Fix release tool links and improve workflow robustness by @rickeylev in #3888
- build(release): support triggering release workflows via comments by @rickeylev in #3889
- chore(release): allow comments to trigger actions, update releasing docs by @rickeylev in #3891
- chore(release): grant write permissions to on_issue_comment workflow by @rickeylev in #3892
- chore(release): add pull-requests: write permission to on_issue_comment workflow by @rickeylev in #3893
- chore(release): auto-add RC tasks to checklist in create-rc by @rickeylev in #3894
- chore(release): secure workflows against shell injection by @rickeylev in #3895
- fix: run executable zip action with execution Python to better support windows building by @dzbarsky in #3890
- chore(release): process backports as part of creating RC by @rickeylev in #3896
- chore(release): automate backport processing on PR merge, and have add-backports accept hashtag and url refs by @rickeylev in #3897
- chore(release): fix promote_rc arguments and align comments by @rickeylev in #3898
- chore(release): fix promote-rc command and update workflow args by @rickeylev in #3899
- chore(release): make promote_rc workflow call publish_release workflow to finish publishing by @rickeylev in #3900
- docs: sync 2.2 changelog and news to main by @rickeylev in #3901
- chore(release): sync changelog and version markers to main during backports by @rickeylev in #3903
- chore: remove stale process-backports-before-rc news file by @rickeylev in #3904
- chore(release): fix invalid workflow file syntax by @rickeylev in #3908
- build(deps): bump astral-sh/ruff-action from 4.0.0 to 4.1.0 by @dependabot[bot] in #3910
- fix(pip): parse the index_url from uv.lock file by @aignas in #3906
- chore: automated code review using antigravity by @rickeylev in #3905
- fix: add explicit
dataattribute tocompile_pip_requirementsand forward it to the generatedpy_binaryby @granatam in #3865 - chore(pr-review): trigger automated review workflow on issue comments by @rickeylev in #3918
- chore(reviewbot): fix antigravity_review execution and configuration by @rickeylev in #3921
- fix(sphinxdocs): invalidate cache on branch change by @kaycebasques in #3917
- refactor: use centralized NOT_ACTUALLY_PUBLIC across internal targets by @rickeylev in #3920
- fix: make executable implicit defaults public so other modules can use rule builders by @13steinj in #3919
- chore(reviewbot): expand multi-model cascade with fallback endpoints by @rickeylev in #3922
- fix(sphinxdocs): clean stale worker output dir and doctrees on first request by @MartinNeudecker in #3933
- build(deps): bump myst-parser from 4.0.1 to 5.1.0 in /docs by @dependabot[bot] in #3927
- build(deps): bump astral-sh/setup-uv from 8.3.0 to 8.3.2 by @dependabot[bot] in #3924
- fix(pypi): handle absolute file URLs in wheel downloader by @aignas in #3935
- chore(release): automate multi-version backports and support direct patch promotion by @rickeylev in #3936
- tests: implement pytest_test rule for internal test usage by @rickeylev in #3931
- feat: add flag aliases to Starlark-defined flags by @gregestren in #3932
- refactor(tools): migrate private release tool tests to pytest and pytest-mock by @rickeylev in #3937
- refactor(release): extract pypi publishing to standalone workflow by @rickeylev in #3940
- docs(releasing): update PyPI account owner information by @rickeylev in #3941
- fix(pypi): don't expose source-less uv.lock packages by @lpulley in #3938
- refactor(reviewbot): use separate jobs to protect access to credentials by @rickeylev in #3943
- test(tools): auto-patch release CLI helpers in conftest.py by @rickeylev in #3939
- tests: add workspace-compatible unified pypi hub so @pypi refs work by @rickeylev in #3946
- tests: convert private tool tests to pytest_test and pytest style by @rickeylev in #3945
- refactor(tests): create conftest py_library target by @rickeylev in #3947
- refactor(pypi): make whl_library a macro and split impl into whl_archive and pip_archive by @aignas in #3948
- build(deps): bump myst-parser from 4.0.1 to 5.1.0 in /docs by @dependabot[bot] in #3942
- refactor(pypi): a seam for source vs library targets by @aignas in #3949
- docs(pypi): add versionadded 2.2.0 directive to uv_lock attribute by @rickeylev in #3953
- agents: clarify fast-tests config flag usage for building by @rickeylev in #3954
- sphinxdocs: create sphinxdocs-specific pyproject and requirements by @rickeylev in #3951
- agents: emphasize trailing ampersand in CI monitor skill invocation by @rickeylev in #3956
- build(deps): bump charset-normalizer from 3.4.3 to 3.4.9 in /tools/publish by @dependabot[bot] in #3928
- fix(pip.parse): allow uv_lock to be set without requirements_lock by @rickeylev in #3952
- agents: add rule for PR descriptions and news entries by @rickeylev in #3959
- fix(coverage): warn about a missing coverage wheel only for the selected runtime by @Syndic in #3955
- build: move requirements and lock files out of docs/ to dev/ by @rickeylev in #3957
- build(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in #3963
- feat(coverage): fallback to pure Python wheel by @aignas in #3961
- agents: add merge-pr skill for shepherding pull request merges by @rickeylev in #3969
- build(deps): bump actions/upload-artifact from 4 to 7 by @dependabot[bot] in #3964
- build(deps): bump bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml from 1.4.1 to 1.4.2 by @dependabot[bot] in #3925
- build(agents): handle blocked Buildkite jobs in CI monitoring and update create-pr skill by @rickeylev in #3975
- build(deps): bump nh3 from 0.3.0 to 0.3.6 in /tools/publish by @dependabot[bot] in #3966
- build(deps): bump secretstorage from 3.3.3 to 3.5.0 in /tools/publish by @dependabot[bot] in #3967
- build(deps): bump the pip group across 1 directory with 3 updates by @dependabot[bot] in #3912
- build(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0 by @dependabot[bot] in #3965
- feat(ci): support GitHub Actions log retrieval and subagent failure analysis by @rickeylev in #3976
- refactor(pypi): add whl_deps_library repo rule by @aignas in #3960
- tests(pypi): add test for excluding bazel files from wheels by @aignas in #3979
- agents: relocate analyze-ci-failure logs to skill scratch directory by @rickeylev in #3980
- agents: update create-pr and analyze-ci-failure skills by @rickeylev in #3981
- agents: update buildkite-retry-job skill to support job-level retries and rebuilds by @rickeylev in #3983
- agents: prevent duplicate CI monitoring processes in monitor-ci-results skill by @rickeylev in #3984
- test: improve error reporting and artifact generation for lockfile test by @rickeylev in #3982
- feat(pypi): support non-sha256 --hash pins and index digests by @abcdabcd987 in #3974
- fix(gazelle)!: use per-version stdlib lists for Python 3.13 and 3.14 by @cj81499 in #3978
- feat(cc): introduce py_extension rule for C/C++ Python extension modules by @rickeylev in #3973
- agents: add technical rules for Starlark, Windows, C++, and testing by @rickeylev in #3986
- docs: convert raw URLs in generated docs and docstrings to hyperlinks by @rickeylev in #3987
- docs(cc): clarify abi_tag is equivalent to SOABI and cite PEP 3149 by @rickeylev in #3985
- agents(monitor-ci-results): ignore superseded retried Buildkite jobs in CI monitor by @rickeylev in #3991
- agents: add concurrent multi-subagent pre-review audit to create-pr skill by @rickeylev in #3992
- fix(sphinxdocs): include stderr in Sphinx worker response output by @rickeylev in #3994
- agents(pr): prohibit per-file edit lists in PR descriptions by @rickeylev in #3996
- agents: explain force-merging while requiring user consent by @rickeylev in #3998
- feat(cc): populate abi and platform settings on local py_cc_toolchain by @rickeylev in #3990
- refactor(cc): simplify _current_py_cc_libs_impl by @rickeylev in #3993
- docs(cc): add py_extension to doc generation and update versionadded markup by @rickeylev in #3989
- agents(monitor-ci-results): autonomous flake retries via subagent and forbid file lists in PRs by @rickeylev in #4001
- agents(rules): add manual tag rule and frontmatter to starlark.md by @rickeylev in #4002
- feat(python): add py_extension to features loadable_symbols by @rickeylev in #4000
- agents: update create-pr skill with interactive artifact requirements by @rickeylev in #4004
- docs(howto): add optional feature loading guide by @rickeylev in #4003
- fix(sphinxdocs): materialize source symlinks to resolve relative cross-references (#3977) by @rickeylev in #4005
- fix(sphinxdocs): fix path resolution for conf.py in separate directory by @rickeylev in #4006
- refactor(toolchain): rename abi_tag to soabi to eliminate PEP ambiguity by @rickeylev in #4008
- build: add static type checking for runfiles with rules_pyrefly by @rickeylev in #4009
- chore(release): ignore .agents directory in version marker replacement by @rickeylev in #4012
- chore(release): indent multi-line bullet points in changelog by @rickeylev in #4013
- chore(release): fix duplicate argument in NamedTemporaryFile by @rickeylev in #4014
- Prepare release v2.3.0 by @github-actions[bot] in #4011
New Contributors
- @maxbirkner made their first contribution in #3832
- @kriscfoster made their first contribution in #3828
- @gleyba made their first contribution in #3845
- @github-actions[bot] made their first contribution in #3874
- @alex-the-third made their first contribution in #3887
- @granatam made their first contribution in #3865
- @MartinNeudecker made their first contribution in #3933
- @abcdabcd987 made their first contribution in #3974
Full Changelog: 2.1.0...2.3.0-rc0