uv icon indicating copy to clipboard operation
uv copied to clipboard

Broken path parsing for install spec

Open flying-sheep opened this issue 1 year ago • 10 comments

$ uv --version
uv 0.2.35
$ uv pip install --editable '/home/phil/Dev/Python/Packaging, Docs/session-info2'
error: Failed to parse: `/home/phil/Dev/Python/Packaging, Docs/session-info2`
  Caused by: Expected path (`/home/phil/Dev/Python/Packaging,`) to end in a supported file extension: `.whl`, `.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, or `.tar.zst`
/home/phil/Dev/Python/Packaging, Docs/session-info2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

flying-sheep avatar Aug 12 '24 11:08 flying-sheep

Thanks!

cc @charliermarsh might a regression from #5888

zanieb avatar Aug 12 '24 12:08 zanieb

I can take a look.

charliermarsh avatar Aug 12 '24 12:08 charliermarsh

Ah, sorry, I should have said that there is also an error with older versions before that PR (e.g. 0.2.32)

The underlying issue of something splitting the path at the space is older.

flying-sheep avatar Aug 12 '24 13:08 flying-sheep

I think we currently require that you use a backslash here.

charliermarsh avatar Aug 12 '24 14:08 charliermarsh

(But of course it should work as-is.)

charliermarsh avatar Aug 12 '24 14:08 charliermarsh

I wasn’t aware that escape sequences in dependency specs are a thing at all!

flying-sheep avatar Aug 12 '24 14:08 flying-sheep

Yeah it's a bit tricky. Like this doesn't work:

-e /Users/crmarsh/workspace/uv/foo bar/black_editable

But it does work if you quote it, or pass it directly on the command-line etc.

charliermarsh avatar Aug 12 '24 15:08 charliermarsh

I am quoting it, see initial comment.

flying-sheep avatar Aug 12 '24 15:08 flying-sheep

Yeah I'm describing what the behavior should be, not what we do today.

charliermarsh avatar Aug 12 '24 15:08 charliermarsh

I see! Thank you for clarifying!

flying-sheep avatar Aug 12 '24 15:08 flying-sheep