Skip to content

Conversation

mancellin
Copy link
Contributor

@mancellin mancellin commented Oct 12, 2024

It was a bit confusing to me that help would not follow my change of PAGER. The reason was that I had set also MANPAGER.

Cf. the implementation at

use_pager = os.environ.get('MANPAGER') or os.environ.get('PAGER')


📚 Documentation preview 📚: https://cpython-previews--125362.org.readthedocs.build/

@ghost
Copy link

ghost commented Oct 12, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Oct 12, 2024
@AA-Turner AA-Turner changed the title doc: fix Pydoc documentation Doc: Note that pydoc uses and prefers MANPAGER Oct 12, 2024
@AA-Turner AA-Turner added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes and removed awaiting merge labels Oct 12, 2024
@AA-Turner
Copy link
Member

Does this also hold true when using the old REPL? (PYTHON_BASIC_REPL)

A

@skirpichev
Copy link
Contributor

@AA-Turner, it seems so. E.g. I can do:

$ MANPAGER=echo PYTHON_BASIC_REPL=1 ./python 
Python 3.14.0a0 (heads/long_export-dirty:76797c8d4b, Oct 12 2024, 18:49:35) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> help(sum)

>>> 

@mancellin
Copy link
Contributor Author

Does this also hold true when using the old REPL? (PYTHON_BASIC_REPL)

The get_pager method is now in _pyrepl but the same implementation used to be in the pydoc module.
The support for MANPAGER is there (undocumented) since 2016 with 9657545

Also relevant : #83581

@AA-Turner AA-Turner enabled auto-merge (squash) October 29, 2024 22:38
@AA-Turner AA-Turner merged commit 0e45b1f into python:main Oct 29, 2024
25 checks passed
@miss-islington-app
Copy link

Thanks @mancellin for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 29, 2024
(cherry picked from commit 0e45b1f)

Co-authored-by: Matthieu Ancellin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 29, 2024
(cherry picked from commit 0e45b1f)

Co-authored-by: Matthieu Ancellin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Oct 29, 2024

GH-126152 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 29, 2024
@bedevere-app
Copy link

bedevere-app bot commented Oct 29, 2024

GH-126153 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 29, 2024
AA-Turner added a commit that referenced this pull request Oct 29, 2024
…#126152)

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

Co-authored-by: Matthieu Ancellin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
AA-Turner added a commit that referenced this pull request Oct 29, 2024
…#126153)

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

Co-authored-by: Matthieu Ancellin <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants