Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix url dependency caching when special urlencoded chars #7921

Merged

Conversation

ralbertazzi
Copy link
Contributor

Minor fix over #7693, ideally to be included in 1.5.0 as well.

Noticed that the url dependency caching behaviour was broken when special characters (+ in the example) are part of the url. Taking the usual PyTorch as example (👀):

  • We were storing the wheel on filesystem as torch-2.0.0%2Bcpu-cp39-cp39-linux_x86_64.whl
  • But we were trying to retrieve from cache torch-2.0.0+cpu-cp39-cp39-linux_x86_64.whl

thus rendering the caching mechanism useless.

The fix correctly stores the wheel on filesystem as torch-2.0.0+cpu-cp39-cp39-linux_x86_64.whl, making the cache great again.

Didn't mind adding a test as using Link should be the general way to go around the codebase instead of using os and urllib directly.

@radoering radoering merged commit ee567a7 into python-poetry:master May 14, 2023
@ralbertazzi ralbertazzi deleted the fix/artifact-cache-url-encoded branch May 14, 2023 15:34
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants