[Python-checkins] [3.10] Remove misformatted exclamation marks in docs (GH-102694) (#102717)

hugovk webhook-mailer at python.org
Wed Mar 15 03:26:53 EDT 2023


https://github.com/python/cpython/commit/087fb56b9de2eedd5061619eda6fa98ee12738fc
commit: 087fb56b9de2eedd5061619eda6fa98ee12738fc
branch: 3.10
author: Hugo van Kemenade <hugovk at users.noreply.github.com>
committer: hugovk <hugovk at users.noreply.github.com>
date: 2023-03-15T09:26:46+02:00
summary:

[3.10] Remove misformatted exclamation marks in docs (GH-102694) (#102717)

Remove the exclamation mark from :program:`!foo` in .rst files because
it inadvertently shows up in the rendered HTML.

(Sphinx's cross-referencing roles use a '!' prefix to suppress
hyperlinking[1], but :program: is not a cross-referencing role so the
'!' is displayed verbatim.)

The exclamation marks in venv.rst were introduced in #98350. See
comments [2] and [3] for additional discussion.

[1]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#cross-referencing-syntax
[2]: https://github.com/python/cpython/pull/98350#issuecomment-1285965759
[3]: https://github.com/python/cpython/pull/98350#issuecomment-1286394047

Reported-by: Vinay Sajip <vinay_sajip at yahoo.co.uk>
Co-authored-by: Tom Levy <tomlevy93 at gmail.com>

files:
M Doc/library/venv.rst

diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst
index 3ab83a23cf24..401f02cd4753 100644
--- a/Doc/library/venv.rst
+++ b/Doc/library/venv.rst
@@ -59,7 +59,7 @@ running from a virtual environment.
 A virtual environment may be "activated" using a script in its binary directory
 (``bin`` on POSIX; ``Scripts`` on Windows).
 This will prepend that directory to your :envvar:`!PATH`, so that running
-:program:`!python` will invoke the environment's Python interpreter
+:program:`python` will invoke the environment's Python interpreter
 and you can run installed scripts without having to use their full path.
 The invocation of the activation script is platform-specific
 (:samp:`{<venv>}` must be replaced by the path to the directory
@@ -82,7 +82,7 @@ containing the virtual environment):
 +-------------+------------+--------------------------------------------------+
 
 .. versionadded:: 3.4
-   :program:`!fish` and :program:`!csh` activation scripts.
+   :program:`fish` and :program:`csh` activation scripts.
 
 .. versionadded:: 3.8
    PowerShell activation scripts installed under POSIX for PowerShell Core



More information about the Python-checkins mailing list