https://github.com/python/cpython/commit/7812dc37ab2c1ec79c93656f951252aa84652593
commit: 7812dc37ab2c1ec79c93656f951252aa84652593
branch: 3.12
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: AA-Turner <9087854+aa-tur...@users.noreply.github.com>
date: 2024-10-29T23:26:29Z
summary:

[3.12] Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (#126153)

Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362)
(cherry picked from commit 0e45b1fd0ffbb165f580ecdfd5234c1d54389501)

Co-authored-by: Matthieu Ancellin <31126826+mancel...@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-tur...@users.noreply.github.com>

files:
M Doc/conf.py
M Doc/library/pydoc.rst

diff --git a/Doc/conf.py b/Doc/conf.py
index 938a61347bac3f..4e76c21fe0c670 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -178,6 +178,7 @@
     ('envvar', 'LC_TIME'),
     ('envvar', 'LINES'),
     ('envvar', 'LOGNAME'),
+    ('envvar', 'MANPAGER'),
     ('envvar', 'PAGER'),
     ('envvar', 'PATH'),
     ('envvar', 'PATHEXT'),
diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst
index 70e9c604ebac4f..e8f153ee1b35ce 100644
--- a/Doc/library/pydoc.rst
+++ b/Doc/library/pydoc.rst
@@ -52,8 +52,9 @@ produced for that file.
    only execute code when a file is invoked as a script and not just imported.
 
 When printing output to the console, :program:`pydoc` attempts to paginate the
-output for easier reading.  If the :envvar:`PAGER` environment variable is set,
-:program:`pydoc` will use its value as a pagination program.
+output for easier reading.  If either the :envvar:`MANPAGER` or the
+:envvar:`PAGER` environment variable is set, :program:`pydoc` will use its
+value as a pagination program. When both are set, :envvar:`MANPAGER` is used.
 
 Specifying a ``-w`` flag before the argument will cause HTML documentation
 to be written out to a file in the current directory, instead of displaying 
text

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to