8000 Comparing herewasmike:main...bazel-contrib:main · herewasmike/rules_python · GitHub
[go: up one dir, main page]

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: herewasmike/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: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 39 files changed
  • 8 contributors

Commits on May 29, 2025

  1. docs: fix sphinxdocs mis-redirect (bazel-contrib#2940)

    The redirect was going to a non-existent URL when viewed on the deployed
    docs.
    
    This was happening because the absolute paths `/api/whatever` don't
    exist in the deployed
    site -- it's actually `/en/latest/api/whatever`. This went unnoticed
    because it works
    locally (where there is no /en/latest prefix).
    
    To fix, use a relative url (relative urls are relative to the path that
    is redirected from)
    rickeylev authored May 29, 2025
    Configuration menu
    Copy the full SHA
    bbf3ab8 View commit details
    Browse the repository at this point in the history
  2. feat: allow custom platform when overriding (bazel-contrib#2880)

    This basically allows using any python-build-standalone archive and
    using it
    if custom flags are set. This is done through the
    `single_version_platform_override()`
    API, because such archives are inherently version and platform specific.
    
    Key changes:
    * The `platform` arg can be any value (mostly; it ends up in repo names)
    * Added `target_compatible_with` and `target_settings` args, which
    become the
      settings used on the generated toolchain() definition.
    
    The platform settings are version specific, i.e. the key
    `(python_version, platform)`
    is what maps to the TCW/TS values.
    
    If an existing platform is used, it'll override the defaults that
    normally come
    from the PLATFORMS global for the particular version. If a new platform
    is used,
    it creates a new platform entry with those settings.
    
    Along the way:
    * Added various docs about internal variables so they're easier to grok
    at a glance.
    
    Work towards bazel-contrib#2081
    rickeylev authored May 29, 2025
    Configuration menu
    Copy the full SHA
    d60cee2 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2025

  1. feat: Support constraints in pip_compile (bazel-contrib#2916)

    This adds in support to pass in a constraints file to pip-compile.
    This is extremly useful when you want to uprade an indirect/intermediate
    dependency to pull in security fixes but don't want to add said
    dependency to
    the requirements.in file.
    
    ---------
    
    Signed-off-by: Vihang Mehta <vihang@gimletlabs.ai>
    Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
    vihangm and aignas authored May 30, 2025
    Configuration menu
    Copy the full SHA
    ce80db6 View commit details
    Browse the repository at this point in the history
  2. fix(pypi): allow pip_compile to work with read-only sources (bazel-co…

    …ntrib#2712)
    
    The validating `py_test` generated by `compile_pip_requirements` chokes
    when the source `requirements.txt` is stored read-only, such as when
    managed by the Perforce Helix Core SCM. Though `dependency_resolver`
    makes a temporary copy of this file, it does so w/ `shutil.copy` which
    preserves the original read-only file mode. To address this, this commit
    replaces `shutil.copy` with a `shutil.copyfileobj` such that the
    temporary file is created w/ permissions according to the user's umask.
    
    Resolves (bazel-contrib#2608).
    
    ---------
    
    Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
    rbeasley-avgo and aignas authored May 30, 2025
    Configuration menu
    Copy the full SHA
    af9e959 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2025

  1. feat(uv): handle credential helpers and .netrc (bazel-contrib#2872)

    This allows one to download the uv binaries from private mirrors.
    
    The plumbing of the auth attrs allows us to correctly use the `~/.netrc`
    or the credential helper for downloading from mirrors that require
    authentication.
    
    Testing notes:
    * When I tested this, it seems that the dist manifest json may not work
      with private mirrors, but I think it is fine for users in such cases
      to define the `uv` srcs using the `urls` attribute.
    
    Work towards bazel-contrib#1975.
    aignas authored May 31, 2025
    Configuration menu
    Copy the full SHA
    02198f6 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2025

  1. fix(pypi): correctly aggregate the requirements files (bazel-contrib#…

    …2932)
    
    This implements the actual fix where we are aggregating the whls and
    sdists
    correctly from multiple different requirements lines.
    
    Fixes bazel-contrib#2648.
    Closes bazel-contrib#2658.
    aignas authored Jun 2, 2025
    Configuration menu
    Copy the full SHA
    948fcec View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2025

  1. fix(pypi): inherit proxy env variables in compile_pip_requirements te…

    …st (bazel-contrib#2941)
    
    Bazel does not pass environment variables implicitly (even running test
    outside of sandbox). This forces compile_pip_requirements test to fail
    with timeout when attempting to run it behind the proxy. Also changes
    test_command in dependency_resolver string helper to use dot instead of
    underscore following deprecation notice
    herewasmike authored Jun 3, 2025
    Configuration menu
    Copy the full SHA
    9429ae6 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2025

  1. feat: add persistent worker for sphinxdocs (bazel-contrib#2938)

    This implements a simple, serialized persistent worker for Sphinxdocs
    with several optimizations. It is enabled by default.
    
    * The worker computes what inputs have changed, allowing Sphinx to only
    rebuild what
      is necessary.
    * Doctrees are written to a separate directory so they are retained
    between builds.
    * The worker tells Sphinx to write output to an internal directory, then
    copies it
    to the expected Bazel output directory afterwards. This allows Sphinx to
    only
      write output files that need to be updated.
    
    This works by having the worker compute what files have changed and
    having a Sphinx
    extension use the `get-env-outdated` event to tell Sphinx which files
    have changed.
    The extension is based on https://pwrev.dev/294057, but re-implemented
    to be
    in-memory as part of the worker instead of a separate extension projects
    must configure.
    
    For rules_python's doc building, this reduces incremental building from
    about 8 seconds
    to about 0.8 seconds. From what I can tell, about half the time is spent
    generating
    doctrees, and the other half generating the output files.
    
    Worker mode is enabled by default and can be disabled on the target or
    by adjusting
    the Bazel flags controlling execution strategy. Docs added to explain
    how.
    
    Because `--doctree-dir` is now always specified and outside the output
    dir,
    non-worker invocations can benefit, too, if run without sandboxing. Docs
    added to
    explain how to do this.
    
    Along the way:
    
    * Remove `--write-all` and `--fresh-env` from run args. This lets direct
      invocations benefit from the normal caching Sphinx does.
    * Change the args formatting to `--foo=bar` so they are a single
    element; just
      a bit nicer to see when debugging.
    
    
    Work towards bazel-contrib#2878,
    bazel-contrib#2879
    
    ---------
    
    Co-authored-by: Kayce Basques <kayce@google.com>
    Co-authored-by: Richard Levasseur <rlevasseur@google.com>
    3 people authored Jun 5, 2025
    Configuration menu
    Copy the full SHA
    0498664 View commit details
    Browse the repository at this point in the history
Loading
0