Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions python/private/pypi/extension.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

"pip module extension for use with bzlmod"

load("@bazel_features//:features.bzl", "bazel_features")
load("@pythons_hub//:interpreters.bzl", "INTERPRETER_LABELS")
load("@pythons_hub//:versions.bzl", "MINOR_MAPPING")
load("@rules_python_internal//:rules_python_config.bzl", rp_config = "config")
Expand Down Expand Up @@ -385,13 +384,9 @@ def _pip_impl(module_ctx):
groups = mods.hub_group_map.get(hub_name),
)

if bazel_features.external_deps.extension_metadata_has_reproducible:
# NOTE @aignas 2025-04-15: this is set to be reproducible, because the
# results after calling the PyPI index should be reproducible on each
# machine.
return module_ctx.extension_metadata(reproducible = True)
else:
return None
return module_ctx.extension_metadata(
reproducible = True,
)
Comment on lines +387 to +389
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change simplifies the logic correctly. However, the removed code contained a useful comment explaining why the extension is marked as reproducible. It would be beneficial for future maintainability to preserve this context. Consider adding a comment to explain the reasoning.

Suggested change
return module_ctx.extension_metadata(
reproducible = True,
)
return module_ctx.extension_metadata( # PyPI index results are reproducible
reproducible = True,
)


_default_attrs = {
"arch_name": attr.string(
Expand Down