rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Failed pypi download message doesn't take experimental_index_url_overrides into account

Open keith opened this issue 7 months ago • 0 comments

🐞 bug report

Affected Rule

pip.parse

Is this a regression?

I doubt it

Description

    experimental_index_url = "https://pypi.org/simple",
    experimental_index_url_overrides = {
        "torchvision": "https://404.com",
        "torchaudio": "https://404.com",
    },

If you have invalid urls in your experimental_index_url_overrides, the error message looks like this:

Error in fail: Failed to download metadata for ["torchaudio", "torchvision"] for from urls: ["https://pypi.org/simple"].
If you would like to skip downloading metadata for these packages please add 'simpleapi_skip=[
    "torchaudio",
    "torchvision",
]' to your 'pip.parse' call.

Since the URL here https://github.com/bazel-contrib/rules_python/blob/f2fa07a56f575028cd84d4d4d169b734507c34d7/python/private/pypi/simpleapi_download.bzl#L135 is hardcoded to the list, and doesn't propagate the actual urls that were tried.

This doesn't change functionality but might distract you into thinking your configuration was wrong.

🌍 Your Environment

Rules_python version:

  
https://github.com/bazel-contrib/rules_python/commit/f2fa07a56f575028cd84d4d4d169b734507c34d7
  

keith avatar Jun 13 '25 18:06 keith