Warehouse: Copyable 'pip install <foo>' line should likely quote <foo> in some cases

Created on 14 Aug 2020  路  2Comments  路  Source: pypa/warehouse

Describe the bug
PyPI shows a copyable pip install <foo> command line, and includes the version when visiting a particular release. (Though there's some discussion in #1563 and #3006 about improving or dropping it).

For a release containing a PEP 440 Epoch, Warehouse shows:

Screen Shot 2020-08-13 at 19 11 54

The line there is likely not something someone wants to copy paste.

In various shells (zsh, bash) the ! there will trigger history completion or the like (so 3!2 will complete in the history line number 2 in the shell history file).

Expected behavior
<foo> should be quoted, at least in the above case, perhaps others, though I can't think of any.

To Reproduce
https://pypi.org/project/composition/8!6.75309/

My Platform
Firefox 80.0b2 (64-bit), macOS


Good First Issue: This issue is good for first time contributors. If you've already contributed to Warehouse, work on another issue without this label instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide.

UUI bug good first issue

All 2 comments

Thanks for the report! We probably want to do this conditionally based on whether the version contains an epoch.

(I've added the "good first issue" label to this issue)

Another option is to quote it all the time, but have the copy/paste button inject the quotes, and leave the visible display alone.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LarsFronius picture LarsFronius  路  4Comments

ewjoachim picture ewjoachim  路  3Comments

nlhkabu picture nlhkabu  路  4Comments

gautamkrishnar picture gautamkrishnar  路  4Comments

nlhkabu picture nlhkabu  路  4Comments