<#20474 Pants 2.19 fails to download WHLs with URL...
# github-notifications
c
#20474 Pants 2.19 fails to download WHLs with URL-escaped chars Issue created by lowvoltage Describe the bug Pants 2.19 fails to download WHL files hosted on URLs that contain URL-escaped characters. This applies to both URLs already present in the lockfile and to URLs retrieved during
generate-lockfiles
. For example, instead of: https://download.pytorch.org/whl/cpu/torch-2.0.1%2Bcpu-cp311-cp311-linux_x86_64.whl it attempts (and fails) to download: https://download.pytorch.org/whl/cpu/torch-2.0.1+cpu-cp311-cp311-linux_x86_64.whl Seems to be related to the
v2.1.148
PEX version, as downgrading to
v2.1.137
resolves the issue Pants version 2.19.0 OS Both MacOS and Linux Additional info Minimalist example to reproduce:
Copy code
python_requirement(
    requirements=["torch==2.0.1+cpu"],
)
Copy code
[GLOBAL]
pants_version = "2.19.0"

backend_packages = [
  "pants.backend.python",
]

[python]
interpreter_constraints = ["==3.11.*"]
enable_resolves = true

[python-repos]
find_links = [
    "<https://download.pytorch.org/whl/torch_stable.html>",
]

# Workaround: Downgrade to a previous PEX version
#[pex-cli]
#known_versions = [
#  "v2.1.137|macos_arm64|faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8|4098329",
#  "v2.1.137|macos_x86_64|faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8|4098329",
#  "v2.1.137|linux_x86_64|faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8|4098329",
#  "v2.1.137|linux_arm64|faad51a6a108fba9d40b2a10e82a2646fccbaf8c3d9be47818f4bffae02d94b8|4098329"
#]
#version = "v2.1.137"
pantsbuild/pants