Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazel-contrib/rules_python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: bazel-contrib/rules_python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release/1.5
Choose a head ref
  • 11 commits
  • 24 files changed
  • 5 contributors

Commits on Jun 14, 2025

  1. Fix argument name typo (#2984)

    ```
    ERROR: Traceback (most recent call last):
            File ".../rules_python++pip+rules_mypy_pip_312_click/BUILD.bazel", line 5, column 20, in <toplevel>
                    whl_library_targets(
            File ".../rules_python+/python/private/pypi/whl_library_targets.bzl", line 337, column 53, in whl_library_targets
                    "//conditions:default": create_inits(
            File ".../rules_python+/python/private/pypi/namespace_pkgs.bzl", line 72, column 25, in create_inits
                    for out in get_files(**kwargs):
            File ".../rules_python+/python/private/pypi/namespace_pkgs.bzl", line 20, column 5, in get_files
                    def get_files(*, srcs, ignored_dirnames = [], root = None):
    Error: get_files() got unexpected keyword argument: ignore_dirnames (did you mean 'ignored_dirnames'?)
    ```
    
    (cherry picked from commit 94e08f7)
    keith authored and aignas committed Jun 14, 2025
    Configuration menu
    Copy the full SHA
    379bef5 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2025

  1. fix: use platform_info.target_settings in toolchain aliases (#3001)

    During the refactor we forgot one more place where the `flag_values` on
    the platform information was used. They were no longer populated and
    broke.
    
    The solution is to use `selects.config_setting_group` to maintain
    behaviour and in order to smoke test I have added a target to verify
    that the aliases work.
    
    Related to #2875
    Fixes #2993
    
    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    (cherry picked from commit 107a878)
    aignas and rickeylev committed Jun 17, 2025
    Configuration menu
    Copy the full SHA
    a89ec64 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2025

  1. fix(toolchains): use posix-compatible exec -a alternative (#3010)

    The `exec -a` command doesn't work in dash, the default shell for
    Ubuntu/debian.
    
    To work around, use `sh -c`, which is posix and dash compatible. This
    allows changing
    the argv0 while invoking a different command. Also adds a test to verify
    the the
    runtime_env toolchain works with bootstrap script.
    
    Fixes #3009
    
    (cherry picked from commit c4543cd)
    rickeylev committed Jun 20, 2025
    Configuration menu
    Copy the full SHA
    528181a View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2025

  1. fix(pypi): namespace_pkgs should pass correct arguments (#3026)

    It seems that the only function that did not have unit tests have bugs
    and the integration tests did not catch it because we weren't creating
    namespacepkg `__init__.py` files.
    
    This change fixes the bug, adds a unit test for the remaining untested
    function.
    
    Fixes #3023
    
    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    (cherry picked from commit 4978027)
    aignas and rickeylev committed Jun 25, 2025
    Configuration menu
    Copy the full SHA
    a1ca1da View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2025

  1. fix: work around version parsing by only parsing if site-packages is …

    …enabled (#3031)
    
    There's a bug in the version string parser that doesn't handle local
    identifiers correctly.
    
    Thankfully, it's only activated in the experimental code path when site
    packages for
    libraries is eanbled. Moving the logic within that block works around
    it.
    
    Work around for
    #3030
    
    (cherry picked from commit aab2650)
    rickeylev committed Jun 26, 2025
    Configuration menu
    Copy the full SHA
    63841ec View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2025

  1. fix(pypi): only generate namespace package shims if implicit namespac…

    …es are disabled (#3059)
    
    The refactoring to move the pkgutil shim generation to build phase
    inverted
    the logic for when it should be activated. When
    `enable_implicit_namespace_pkgs=True`, it means to not generate the
    pkgutil shims
    ("respect the Python definition of the namespace package").
    
    To fix, just invert the logic that activates it.
    
    A test will be added in a subsequent PR because the necessary helper
    isn't
    in the 1.5 branch.
    
    Fixes #3038
    
    ---------
    
    Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
    (cherry picked from commit 47c681b)
    rickeylev and aignas committed Jul 6, 2025
    Configuration menu
    Copy the full SHA
    18d0d29 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2025

  1. fix: Don't let deprecated test targets get matched by '...' (#3045)

    This fixes "target '//foo_test' is deprecated: Use 'foo.test' instead.
    The '*_test' target will be removed in the next major release." being
    warned about once per `compile_pip_requirement` call when running `bazel
    test ...`.
    
    Work towards #2976
    
    (cherry picked from commit 4e22d25)
    robinlinden authored and aignas committed Aug 11, 2025
    Configuration menu
    Copy the full SHA
    ba2e4f8 View commit details
    Browse the repository at this point in the history
  2. fix(pypi): support properly installing sdists via pypi without index (#…

    …3115)
    
    This fixes the subtle bug introduced in #2871, where we were dropping
    the URL from the requirement, because we can download the sdist
    directly. We cannot add --no-index because sdists in general may
    require extra build dependencies and we had already issues previously
    (see 0.36 release notes).
    
    Fixes #2363
    Fixes #3131
    
    ---------
    
    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    (cherry picked from commit f6dd386)
    
    Cherry-pick notes: adapted the changelog to mention 1.5.2
    aignas committed Aug 11, 2025
    Configuration menu
    Copy the full SHA
    9a4b874 View commit details
    Browse the repository at this point in the history
  3. chore(deps): upgrade bazel-skylib to 1.8.1 (#3118)

    With most recent bazel versions, older versions of rules_python started
    spewing a lot of warnings due to us using `bazel-skylib` for copying
    files around.
    
    The only solution is to bump the bazel-skylib version.
    
    Fixes #3113
    
    ---------
    
    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    (cherry picked from commit 673cd76)
    
    Cherry-pick notes: adapted changelog to mention 1.5.2
    aignas committed Aug 11, 2025
    Configuration menu
    Copy the full SHA
    277026b View commit details
    Browse the repository at this point in the history
  4. fix(core): do not assume rules_python runtime (#3134)

    This change reverts the behaviour where we assume that particular
    attributes will be always present - if bazel is doing autoloading for
    WORKSPACE builds (7.6.1), then we will crash with attribute error.
    
    I could not think how to add a unit test, which would test this fix
    because it seems to only happen with a released version of rules_python
    where we are not using `local_repository` override.
    
    Fixes #3119
    
    ---------
    
    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    (cherry picked from commit acf7507)
    
    Cherry-pick notes: adjusted changelog to mention 1.5.2
    aignas committed Aug 11, 2025
    Configuration menu
    Copy the full SHA
    fdaca1b View commit details
    Browse the repository at this point in the history
  5. fix(local-toolchains): don't watch non-existent include directory (#3048

    )
    
    Apparently, Macs can mis-report their include directory.
    
    Since includes are only needed if C extensions are built, skip watching
    the directory
    if it doesn't exist.
    
    Work around for
    #3043
    
    ---------
    
    Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
    Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
    (cherry picked from commit be55942)
    3 people committed Aug 11, 2025
    Configuration menu
    Copy the full SHA
    34051e0 View commit details
    Browse the repository at this point in the history
Loading