Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
bpo-37755: Use configured output in pydoc instead of pager#15105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
the-knights-who-say-ni commentedAug 4, 2019
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed thePSF contributor agreement (CLA). Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please followthe steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You cancheck yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add tests and a NEWS entry.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
If the Helper() class was initialized with an output, the topics, keywords and symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping the previous behavior if no output was configured.
eht16 commentedJun 2, 2024
I have made the requested changes; please review again Though I'm not sure why the Docs action fail, I don't see how the references are incorrect. |
Thanks for making the requested changes! @serhiy-storchaka: please review the changes made to this pull request. |
Misc/NEWS.d/next/Library/2024-06-02-13-35-11.gh-issue-81936.ETeW9x.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Lib/test/test_pydoc/test_pydoc.py Outdated
| pydoc.getpager=getpager_new | ||
| try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You can usetest.support.swap_attr() orunittest.mock.patch().
It would be nice to test also that the pager was not called (otherwise why do you need to patch it?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good idea, done.
I modified also the existing testtest_help_output_redirect from which I borrowed the "getpager" handling code. To me it also seems more reasonable to use mocking here.
…1936.ETeW9x.rstCo-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Very good. But it seems thatgetpager() is never called inpydoc, so mocking it does not have effect. Should not you mockpager?
eht16 commentedJun 8, 2024
Oops, thanks for noticing. I thought I'd like to squash the "fixup" commits or do you want to it yourself on merging? |
serhiy-storchaka left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
Usually we only squash on merging.
Thanks@eht16 for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…15105)If the Helper() class was initialized with an output, the topics, keywordsand symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping theprevious behavior if no output was configured.(cherry picked from commit2080425)Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
Sorry,@eht16 and@serhiy-storchaka, I could not cleanly backport this to |
GH-120261 is a backport of this pull request to the3.13 branch. |
…thonGH-15105)If the Helper() class was initialized with an output, the topics, keywordsand symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping theprevious behavior if no output was configured.(cherry picked from commit2080425)Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
GH-120262 is a backport of this pull request to the3.12 branch. |
…-15105) (GH-120262)If the Helper() class was initialized with an output, the topics, keywordsand symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping theprevious behavior if no output was configured.(cherry picked from commit2080425)Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
…-15105) (GH-120261)If the Helper() class was initialized with an output, the topics, keywordsand symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping theprevious behavior if no output was configured.(cherry picked from commit2080425)Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
…15105)If the Helper() class was initialized with an output, the topics, keywordsand symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping theprevious behavior if no output was configured.
…15105)If the Helper() class was initialized with an output, the topics, keywordsand symbols help still use the pager instead of the output.Change the behavior so the output is used if available while keeping theprevious behavior if no output was configured.
Uh oh!
There was an error while loading.Please reload this page.
If the Helper() class was initialized with an output, the topics, keywords and symbols help still use the pager instead of the output.
Change the behavior so the output is used if available while keeping the previous behavior if no output was configured.
https://bugs.python.org/issue37755