Description
π bug report
Affected Rule
The issue is caused by the rule: pip.parseIs this a regression?
Yes, the previous version in which this bug was not present was: 1.3.0Description
After upgrade to 1.4.0 we get an error on pip.parse:
Error: 'struct' value has no field or method 'sha256s_by_version'
965dd51 looks related
π¬ Minimal Reproduction
...
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
experimental_index_url = "http://some-proxy-url/pypi/simple", # have to be set
hub_name = "hub",
python_version = "3.10.8",
requirements_lock = "//:requirements.txt",
)
...
Run bazel mod deps --lockfile_mode=update
π₯ Exception or Error
```
File "/private/var/tmp/_bazel_roman.vlasenko/7eb23c38ebf1165e125a92c28d7d5daa/external/rules_python+/python/private/pypi/parse_requirements.bzl", line 321, column 33, in _add_dists
shas_to_use = index_urls.sha256s_by_version.get(version, [])
Error: 'struct' value has no field or method 'sha256s_by_version'
Available attributes: sdists, sha256_by_version, whls
ERROR: error evaluating module extension @@rules_python+//python/extensions:pip.bzl%pip
```
π Your Environment
Operating System:
24.4.0 Darwin Kernel Version 24.4.0: Wed Mar 19 21:17:35 PDT 2025; root:xnu-11417.101.15~1/RELEASE_ARM64_T6041 arm64
Output of bazel version
:
Bazelisk version: 1.25.0
Build label: 8.1.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Tue Feb 25 18:53:44 2025 (1740509624)
Build timestamp: 1740509624
Build timestamp as int: 1740509624
Rules_python version:
1.4.0
Anything else relevant?