Skip to content

Conversation

@vishalnandagopal
Copy link

@vishalnandagopal vishalnandagopal commented Nov 16, 2025

image The link is rendered incorrectly in github actions otherwise

A changelog/news entry is not needed for this.

"rendering your system unusable. "
"It is recommended to use a virtual environment instead: "
"https://pip.pypa.io/warnings/venv. "
"https://pip.pypa.io/warnings/venv ."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, the space looks ugly. In my opinion, it's the terminal's code for guessing what constitutes a URL that is wrong here (how often does a URL end in a dot?)

Suggested change
"https://pip.pypa.io/warnings/venv ."
"(see https://pip.pypa.io/warnings/venv)"

(plus, remove the colon from the line above, but I don't know how to get Github's "suggestion" mechanism to include that).

If the terminal still can't correctly find the URL, then IMO it's not our problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, strong -1 on a space after the url, when the diff came through to my email client it had no problem highlighting the url with no space.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, I'm actually perfectly happy with leaving things as they are - my suggested fix to the PR was only intended for if we want to change this at all.

Copy link
Author

@vishalnandagopal vishalnandagopal Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as a URL can end in a dot, the code for parsing the URL is valid and correct. The page that this is supposed to point towards does not end with a dot so it print statement is currently wrong.

All fully-qualified domain names end with a dot. I could not find any restrictions on on a path ending with a dot? Sites like Wikipedia treat it as a valid URL (example 1).

Also, the screenshot is from GitHub actions and not exactly from the terminal (I have edited the PR description to reflect the same).

@pfmoore - Using a ) at the end will have the same issue
image

Copy link
Member

@notatallshaw notatallshaw Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems the relevant spec: https://datatracker.ietf.org/doc/html/rfc3986/#appendix-C ?

It recommends using double quotes, e.g. "https://pip.pypa.io/warnings/venv", or angled brackets, e.g. <https://pip.pypa.io/warnings/venv>. I don't have a strong opinion on if pip should adopt either of these conventions in displaying URLs in user facing messages, but if we do it should be consistent everywhere.

It also says software that accepts typed URIs should attempt to recognize these situations:

For robustness, software that accepts user-typed URI should attempt
to recognize and strip both delimiters and embedded whitespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, Windows Terminal correctly identifies that the final "." is not part of the URL.

Honestly, I don't think we should be trying to guess what tools are doing as a "convenience" for the user. We should just print the text and leave it at that. This is meant to be text for the user to read, not machine-readable output.

It's perfectly possible (albeit a little less convenient) to copy the URL manually and paste it into your browser, if your terminal (or whatever tool you are using to view pip's output) messes up its URL detection.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks everyone. Closing this then

@notatallshaw notatallshaw added the skip news Does not need a NEWS file entry (eg: trivial changes) label Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news Does not need a NEWS file entry (eg: trivial changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants