8000 Spurious warnings when using experimental_index_url_overrides in pip.parse · Issue #2966 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content
Spurious warnings when using experimental_index_url_overrides in pip.parse #2966
Closed
@thirtyseven

Description

@thirtyseven

🐞 bug report

Affected Rule

The issue is caused by the rule: pip.parse

Is this a regression?

No

Description

When using experimental_index_url and experimental_extra_index_urls and certain packages are only available in the extra index, a warning will be generated recommending that those packages be added to experimental_index_url_overrides. However, even after the packages are added, empty warnings will continue to be emitted:

DEBUG: /private/var/tmp/_bazel_tkaplan/2ee08b28e31e216c71c3665814b9e6fa/external/rules_python~/python/private/pypi/simpleapi_download.bzl:151:14: You can use the following `index_url_overrides` to avoid the 404 warnings:
{}

🔬 Minimal Reproduction

I can't easily create a full repro because I don't have access to a PyPI repo with packages that aren't on the main PyPI. However, our MODULE.bazel looks like this:

    pip.parse(
        enable_implicit_namespace_pkgs = True,
        experimental_extra_index_urls = [
            "<our artifactory>",
        ],
        experimental_index_url = "https://pypi.org/simple",
        experimental_index_url_overrides = {
            "<private pip package>": "https://<our artifactory>/artifactory/api/pypi/pypi-local/simple/",
        },
        requirements_by_platform = {
            "//3rdparty/python:requirements_linux.txt": "linux_*",
            "//3rdparty/python:requirements_darwin.txt": "osx_*",
        },
    )

🔥 Exception or Error

DEBUG: /private/var/tmp/_bazel_tkaplan/2ee08b28e31e216c71c3665814b9e6fa/external/rules_python~/python/private/pypi/simpleapi_download.bzl:151:14: You can use the following `index_url_overrides` to avoid the 404 warnings:
{}

🌍 Your Environment

Operating System:

  
macOS 15.5
  

Output of bazel version:

  
Bazelisk version: 1.25.0
Build label: 7.5.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Jan 30 18:34:02 2025 (1738262042)
Build timestamp: 1738262042
Build timestamp as int: 1738262042
  

Rules_python version:

  
1.4.1
  

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0