Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency rules_python to v0.40.0 #409

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 18, 2024

This PR contains the following updates:

Package Type Update Change
rules_python http_archive minor 0.36.0 -> 0.40.0

Release Notes

bazelbuild/rules_python (rules_python)

v0.40.0

Compare Source

{#v0-40-changed}

Changed
  • Nothing changed.

{#v0-40-fixed}

Fixed
  • (rules) Don't drop custom import paths if Bazel-builtin PyInfo is removed.
    (2414).

{#v0-40-added}

Added
  • Nothing added.

{#v0-40-removed}

Removed
  • (publish) Remove deprecated requirements.txt for the twine dependencies.
    Please use requirements_linux.txt instead.
  • (python_repository) Use bazel's built in zstd support and remove attributes
    for customizing the zstd binary to be used for zstd archives in the
    {bzl:obj}python_repository repository_rule. This affects the
    {bzl:obj}python_register_toolchains and
    {bzl:obj}python_register_multi_toolchains callers in the WORKSPACE.

{#v0-39-0}

v0.39.0

Compare Source

{#v0-39-0-changed}

Changed
  • (deps) bazel_skylib 1.6.1 -> 1.7.1
  • (deps) rules_cc 0.0.9 -> 0.0.14
  • (deps) protobuf 24.4 -> 29.0-rc2
  • (deps) rules_proto 6.0.0-rc1 -> 6.0.2
  • (deps) stardoc 0.6.2 -> 0.7.1
  • For bzlmod, Bazel 7.4 is now the minimum Bazel version.
  • (toolchains) Use the latest indygreg toolchain release 20241016 for Python versions:
    • 3.9.20
    • 3.10.15
    • 3.11.10
    • 3.12.7
    • 3.13.0
  • (pypi) The naming scheme for the bzlmod spoke repositories have changed as
    all of the given requirements.txt files are now parsed by default, to
    temporarily restore the behavior, you can use
    {bzl:obj}pip.parse.extra_hub_aliases, which will be removed or made noop in
    the future.

{#v0-39-0-fixed}

Fixed
  • (precompiling) Skip precompiling (instead of erroring) if the legacy
    @bazel_tools//tools/python:autodetecting_toolchain is being used
    (#​2364).

{#v0-39-0-added}

Added
  • Bazel 8 is now supported.
  • (toolchain) Support for freethreaded Python toolchains is now available. Use
    the config flag //python/config_settings:py_freethreaded to toggle the
    selection of the free-threaded toolchains.
  • (toolchain) {obj}py_runtime.abi_flags attribute and
    {obj}PyRuntimeInfo.abi_flags field added.

{#v0-39-0-removed}

Removed
  • Support for Bazel 6 using bzlmod has been dropped.

{#v0-38-0}

v0.38.0

Compare Source

{#v0-38-0-changed}

Changed
  • (deps) (WORKSPACE only) rules_cc 0.0.13 and protobuf 27.0 is now the default
    version used; this for Bazel 8+ support (previously version was rules_cc 0.0.9
    and no protobuf version specified)
    (2310).
  • (publish) The dependencies have been updated to the latest available versions
    for the twine publishing rule.
  • (whl_library) Remove --no-build-isolation to allow non-hermetic sdist builds
    by default. Users wishing to keep this argument and to enforce more hermetic
    builds can do so by passing the argument in
    pip.parse#extra_pip_args
  • (pip.parse) {attr}pip.parse.whl_modifications now normalizes the given whl names
    and now pyyaml and PyYAML will both work.
  • (bzlmod) pip.parse spoke repository naming will be changed in an upcoming
    release in places where the users specify different package versions per
    platform in the same hub repository. The naming of the spoke repos is
    considered an implementation detail and we advise the users to use the hub
    repository directly and make use of {bzl:obj}pip.parse.extra_hub_aliases
    feature added in this release.

{#v0-38-0-fixed}

Fixed
  • (pypi) (Bazel 7.4+) Allow spaces in filenames included in whl_librarys
    (617).
  • (pypi) When {attr}pip.parse.experimental_index_url is set, we need to still
    pass the extra_pip_args value when building an sdist.
  • (pypi) The patched wheel filenames from now on are using local version specifiers
    which fixes usage of the said wheels using standard package managers.
  • (bzlmod) The extension evaluation has been adjusted to always generate the
    same lock file irrespective if experimental_index_url is set by any module
    or not. To opt into this behavior, set
    {bzl:obj}pip.parse.parse_all_requirements_files, which will become the
    default in future releases leading up to 1.0.0. Fixes
    #​2268. A known
    issue is that it may break bazel query and in these use cases it is
    advisable to use cquery or switch to download_only = True

{#v0-38-0-added}

Added
  • (publish) The requirements file for the twine publishing rules have been
    updated to have a new convention: requirements_darwin.txt,
    requirements_linux.txt, requirements_windows.txt for each respective OS
    and one extra file requirements_universal.txt if you prefer a single file.
    The requirements.txt file may be removed in the future.
  • The rules_python version is now reported in //python/features.bzl#features.version
  • (pip.parse) {attr}pip.parse.extra_hub_aliases can now be used to expose extra
    targets created by annotations in whl repositories.
    Fixes #​2187.
  • (bzlmod) pip.parse now supports whl-only setup using
    download_only = True where users can specify multiple requirements files
    and use the pip backend to do the downloading. This was only available for
    users setting {bzl:obj}pip.parse.experimental_index_url, but now users have
    more options whilst we continue to work on stabilizing the experimental feature.

{#v0-37-2}

v0.37.2

Compare Source

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.37.2")

pip = use_extension("@​rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    hub_name = "pip",
    python_version = "3.11",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

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 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
    strip_prefix = "rules_python-0.37.2",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.37.2/rules_python-0.37.2.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 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
    strip_prefix = "rules_python-0.37.2/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.37.2/rules_python-0.37.2.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()

Full Changelog: bazelbuild/rules_python@0.37.1...0.37.2

v0.37.1

Compare Source

{#v0-37-1-fixed}

Fixed
  • (rules) Setting --incompatible_python_disallow_native_rules no longer
    causes rules_python rules to fail
    (#​2326).

{#v0-37-0}

v0.37.0

Compare Source

{#v0-37-0-changed}

Changed
  • BREAKING py_library no longer puts its source files or generated pyc
    files in runfiles; it's the responsibility of consumers (e.g. binaries) to
    populate runfiles with the necessary files. Adding source files to runfiles
    can be temporarily restored by setting {obj}--add_srcs_to_runfiles=enabled,
    but this flag will be removed in a subsequent releases.
  • {obj}PyInfo.transitive_sources is now added to runfiles. These files are
    .py files that are required to be added to runfiles by downstream binaries
    (or equivalent).
  • (toolchains) py_runtime.implementation_name now defaults to cpython
    (previously it defaulted to None).
  • (toolchains) The exec tools toolchain is enabled by default. It can be
    disabled by setting
    {obj}--@​rules_python//python/config_settings:exec_tools_toolchain=disabled.
  • (deps) stardoc 0.6.2 added as dependency.

{#v0-37-0-fixed}

Fixed
  • (bzlmod) The python.override(minor_mapping) now merges the default and the
    overridden versions ensuring that the resultant minor_mapping will always
    have all of the python versions.
  • (bzlmod) The default value for the {obj}--python_version flag will now be
    always set to the default python toolchain version value.
  • (bzlmod) correctly wire the {attr}pip.parse.extra_pip_args all the
    way to {obj}whl_library. What is more we will pass the extra_pip_args to
    {obj}whl_library for sdist distributions when using
    {attr}pip.parse.experimental_index_url. See
    #​2239.
  • (whl_filegroup): Provide per default also the RECORD file
  • (py_wheel): RECORD file entry elements are now quoted if necessary when a
    wheel is created
  • (whl_library) truncate progress messages from the repo rule to better handle
    case where a requirement has many --hash=sha256:... flags
  • (rules) compile_pip_requirements passes env to the X.update target (and
    not only to the X_test target, a bug introduced in
    #​1067).
  • (bzlmod) In hybrid bzlmod with WORKSPACE builds,
    python_register_toolchains(register_toolchains=True) is respected
    (#​1675).
  • (precompiling) The {obj}pyc_collection attribute now correctly
    enables (or disables) using pyc files from targets transitively
  • (pip) Skip patching wheels not matching pip.override's file
    (#​2294).
  • (chore): Add a rules_shell dev dependency and moved a sh_test target
    outside of the //:BUILD.bazel file.
    Fixes #​2299.

{#v0-37-0-added}

Added
  • (py_wheel) Now supports compress = (True|False) to allow disabling
    compression to speed up development.
  • (toolchains): A public //python/config_settings:python_version_major_minor has
    been exposed for users to be able to match on the X.Y version of a Python
    interpreter.
  • (api) Added {obj}merge_py_infos() so user rules can merge and propagate
    PyInfo without losing information.
  • (toolchains) New Python versions available: 3.13.0 using the 20241008 release.
  • (toolchains): Bump default toolchain versions to:
    • 3.8 -> 3.8.20
    • 3.9 -> 3.9.20
    • 3.10 -> 3.10.15
    • 3.11 -> 3.11.10
    • 3.12 -> 3.12.7
  • (coverage) Add support for python 3.13 and bump coverage.py to 7.6.1.
  • (bzlmod) Add support for download_only flag to disable usage of sdists
    when {bzl:attr}pip.parse.experimental_index_url is set.
  • (api) PyInfo fields: {obj}PyInfo.transitive_implicit_pyc_files,
    {obj}PyInfo.transitive_implicit_pyc_source_files.

{#v0-37-0-removed}

Removed
  • (precompiling) {obj}--precompile_add_to_runfiles has been removed.
  • (precompiling) {obj}--pyc_collection has been removed. The pyc_collection
    attribute now bases its default on {obj}--precompile.
  • (precompiling) The {obj}precompile=if_generated_source value has been removed.
  • (precompiling) The {obj}precompile_source_retention=omit_if_generated_source value has been removed.

{#v0-36-0}


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team October 18, 2024 20:20
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from 6b7036f to e619672 Compare October 20, 2024 01:33
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.37.0 chore(deps): update dependency rules_python to v0.37.1 Oct 23, 2024
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 2 times, most recently from 95d0f59 to 5ec7a4b Compare October 27, 2024 07:00
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.37.1 chore(deps): update dependency rules_python to v0.37.2 Oct 27, 2024
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.37.2 chore(deps): update dependency rules_python to v0.38.0 Nov 8, 2024
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 2 times, most recently from 4db1651 to 52aa84d Compare November 13, 2024 02:19
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.38.0 chore(deps): update dependency rules_python to v0.39.0 Nov 13, 2024
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from 52aa84d to 1da9373 Compare November 17, 2024 06:57
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.39.0 chore(deps): update dependency rules_python to v0.40.0 Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants