Uh oh!
There was an error while loading. Please reload this page.
feat!(pypi): enable bazel downloader by default - #3691
Conversation
Summary: - change: Set `https://pypi.org/simple` as the default index. - refactor: Leave the code for the legacy behaviour in-tact in case we need to do more work on the configuration to exclude the cases where the downloader should be used. - add: add `index_url` configuration option for setting the defaults. - add: add a small utility for parsing the arguments. - fix: downloader will not be used if there is no url associated with the source irrespective of what the index_url setting is. - fix: ensure all of the URLs are normalized when used. What we can do later: - Make the experimental flags noop. - Add extra APIs for setting defaults, etc. - Do extra fixes for falling back to previous behaviour. - Add docs for how to customize things. Fixesbazel-contrib#260Fixesbazel-contrib#1357Fixesbazel-contrib#2241Fixesbazel-contrib#2951
aignas
commented
Apr 11, 2026
@dougthor42, FYI, this may be interesting to test, but it can wait until rc0 is released. |
There was a problem hiding this comment.
Code Review
This pull request transitions the pip extension from experimental index URL attributes to standard pip arguments like --index-url and --extra-index-url, while introducing a new index_url attribute in pip.default. It includes a new argparse utility for extracting these values from requirement files and updates the hub builder logic to support these changes. Review feedback identified a critical bug in parse_requirements.bzl where the Bazel downloader could be unintentionally disabled due to incorrect argument passing. Additionally, suggestions were made to label experimental attributes as deprecated rather than no-ops to reflect their current fallback behavior and to ensure consistent URL formatting for the default index.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rickeylev
commented
Apr 11, 2026
is this a breaking change? I see some of the If so, that's fine. Lets just document it and add |
Uh oh!
There was an error while loading. Please reload this page.
This just adds extra tests to verify behaviour end-to-end to better reason in case of any bug reports during the RC phase. Followup to bazel-contrib#3691
This just adds extra tests to verify behaviour end-to-end to better reason in case of any bug reports during the RC phase. Followup to #3691
This simply adds extra unit tests to ensure that the code I have added in #3691 is well covered.
Summary:
https://pypi.org/simpleas the default index.need to do more work on the configuration to exclude the cases where
the downloader should be used.
index_urlconfiguration option for setting the defaults.the source irrespective of what the index_url setting is.
Fixes#260
Fixes#1357
Fixes#2241
Fixes#2951