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

Support absolute path on windows #1539

Closed
Czaki opened this issue Feb 16, 2024 · 5 comments · Fixed by #1725
Closed

Support absolute path on windows #1539

Czaki opened this issue Feb 16, 2024 · 5 comments · Fixed by #1725
Assignees
Labels
bug Something isn't working windows Specific to the Windows platform

Comments

@Czaki
Copy link
Contributor

Czaki commented Feb 16, 2024

When plaing with tox integration I got two bug reports that suggest that uv is not properly interpreting absolute windows paths.

When try locally

uv pip install napari@C:\Users\Grzegorz\Documents\Projects\napari\dist\napari-0.5.0a2.dev542+g9ad565f7.tar.gz
⠙ Resolving dependencies...
thread 'main' panicked at D:\a\uv\uv\crates\uv-distribution\src\source\mod.rs:168:22:
Distribution must have a filename: UrlFilename(Url { scheme: "c", cannot_be_a_base: true, username: "", password: None, host: None, port: None, path: "\\Users\\Grzegorz\\Documents\\Projects\\napari\\dist\\napari-0.5.0a2.dev542+g9ad565f7.tar.gz", query: None, fragment: None })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

On CI: https://github.com/napari/napari/actions/runs/7935590920/job/21669475977?pr=6668#step:12:51

py311-windows-pyqt6-no_cov: install_package> python -I -m uv pip install --force-reinstall --no-deps "napari @ D:\a\napari\napari\dist\napari-0.5.0a2.dev560+g2c217efd-py3-none-any.whl"
error: Unable to extract filename from URL: d:\a\napari\napari\dist\napari-0.5.0a2.dev560+g2c217efd-py3-none-any.whl

It looks like there is a problem with parsing the Windows path. Did I'm correct?

@charliermarsh
Copy link
Member

Yeah that seems wrong...

@charliermarsh charliermarsh added the bug Something isn't working label Feb 16, 2024
@Czaki Czaki changed the title Support absolute path on windos Support absolute path on windows Feb 16, 2024
@MichaReiser MichaReiser added the windows Specific to the Windows platform label Feb 16, 2024
@charliermarsh charliermarsh self-assigned this Feb 16, 2024
@charliermarsh
Copy link
Member

Reproduced, will fix.

@charliermarsh
Copy link
Member

This didn't go out in v0.1.3, but will be fixed soon.

@gaborbernat
Copy link
Contributor

This is blocking currently tox-uv supporting Windows (tox-dev/tox-uv#19).

@charliermarsh
Copy link
Member

👍 I’m hoping to fix it tomorrow.

charliermarsh added a commit that referenced this issue Feb 20, 2024
## Summary

The main change is that we need to have an explicit list of protocols we
_do_ support (like `https`), so that when we see a Windows absolute path
(`C:\...`), we don't treat the `C` as a protocol itself.

Closes #1539.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants