feat!(pypi): enable bazel downloader by default#3691
feat!(pypi): enable bazel downloader by default#3691rickeylev merged 7 commits intobazel-contrib:mainfrom
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. Fixes bazel-contrib#260 Fixes bazel-contrib#1357 Fixes bazel-contrib#2241 Fixes bazel-contrib#2951
|
@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.
|
is this a breaking change? I see some of the If so, that's fine. Lets just document it and add |
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