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

Replace whitespace in file:// with %20 #214

Merged
merged 9 commits into from
Jan 3, 2025
Merged

Replace whitespace in file:// with %20 #214

merged 9 commits into from
Jan 3, 2025

Conversation

basnijholt
Copy link
Owner

@basnijholt basnijholt commented Jan 3, 2025

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.99%. Comparing base (3d69198) to head (2dfd6f1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #214   +/-   ##
=======================================
  Coverage   96.99%   96.99%           
=======================================
  Files          10       10           
  Lines        1431     1432    +1     
=======================================
+ Hits         1388     1389    +1     
  Misses         43       43           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ichard26
Copy link
Contributor

ichard26 commented Jan 3, 2025

  Full diff:
    [
        'foo',
        'local_package @ '
  -     'file://C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_pip_install_local_depende0/local_package',
  +     'file://///C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_pip_install_local_depende0/local_package',
  ?           +++
    ]

Yeah... so writing unit tests when any of the stdlib path <-> URL translation functions are involved is a pain. The number of leading slashes (and even the presence) of the leading slash is platform and Python version dependant. See also pypa/pip#13138 (comment)

@basnijholt
Copy link
Owner Author

Loooool 😭😂

This single space is taking too many hours 😆

@ichard26
Copy link
Contributor

ichard26 commented Jan 3, 2025

Honestly, if you want, you can fall back to escaping only spaces if you assume people won't really be using nonstandard paths. I don't contribute to your project, so if you think it's not worth the testing effort to properly translate paths to URLs, that is your choice :)

@basnijholt basnijholt merged commit be527d4 into main Jan 3, 2025
57 checks passed
@basnijholt basnijholt deleted the fix-encoding branch January 3, 2025 04:43
@basnijholt
Copy link
Owner Author

Right, I just reverted to that. Once this issue appears again I will know how to fix it, however, that day might never come, haha.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

installing local dependencies from wheel/zip files
2 participants