You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pip.override() to patch a wheel that (unfortunately) includes files whose name contain commas, and when I try to build a target that uses that patched wheel as a dependency, Bazel fails with the error below, I think because rules_python is not quoting those filenames in the updated RECORD file to avoid https://pypi.org/project/installer/ parsing them incorrectly when the wheel is later installed.
🔥 Exception or Error
Traceback (most recent call last):
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~/python/private/pypi/whl_installer/wheel_installer.py", line 205, in <module>
main()
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~/python/private/pypi/whl_installer/wheel_installer.py", line 160, in main
_extract_wheel(
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~/python/private/pypi/whl_installer/wheel_installer.py", line 121, in _extract_wheel
whl.unzip(installation_dir)
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~/python/private/pypi/whl_installer/wheel.py", line 377, in unzip
installer.install(
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~~internal_deps~pypi__installer/installer/_core.py", line 96, in install
for record_elements, stream, is_executable in source.get_contents():
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~~internal_deps~pypi__installer/installer/sources.py", line 301, in get_contents
record_mapping = {record[0]: record for record in records}
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~~internal_deps~pypi__installer/installer/sources.py", line 301, in <dictcomp>
record_mapping = {record[0]: record for record in records}
File "/home/kevin/.bazel/d13b924e1e99a7808dc764c718e83a2c/external/rules_python~~internal_deps~pypi__installer/installer/records.py", line 214, in parse_record_file
raise InvalidRecordEntry(elements=elements, issues=[message])
installer.records.InvalidRecordEntry: Row Index 360: expected 3 elements, got 5
🐞 bug report
Affected Rule
The issue is caused by the rule:pip.override()
: https://rules-python.readthedocs.io/en/latest/api/rules_python/python/extensions/pip.html#pip.overrideIs this a regression?
NoDescription
I'm using
pip.override()
to patch a wheel that (unfortunately) includes files whose name contain commas, and when I try to build a target that uses that patched wheel as a dependency, Bazel fails with the error below, I think becauserules_python
is not quoting those filenames in the updatedRECORD
file to avoid https://pypi.org/project/installer/ parsing them incorrectly when the wheel is later installed.🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
To work around this issue I'm patching
rules_python
with this diff that appears to fix the issue:The text was updated successfully, but these errors were encountered: