This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gpanders
Recipients gpanders
Date 2021-08-21.03:22:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629516147.02.0.928809585196.issue44967@roundup.psfhosted.org>
In-reply-to
Content
Currently pydoc returns an exit code of zero no matter what, even with e.g.

    pydoc lsjdfkdfj

However, the ability to know whether or not pydoc successfully found a result is useful in tools that embed pydoc in some way.

Here's one use case: Vim and Neovim have a feature that allows a user to run an external command for the keyword under the cursor (keywordprg). In Python files, this defaults to pydoc. In Neovim, we would like to automatically close the PTY buffers that we create for these processes when they finish without any errors, but if it returns a non-zero exit code we want to keep the PTY buffer open so the user can see what went wrong. Because pydoc returns immediately when it fails to find a match and does not indicate that it failed via a return code, the PTY buffer is closed immediately with no indication to the user that anything went wrong.

I have a patch prepared for this that I will link to the issue.
History
Date User Action Args
2021-08-21 03:22:27gpanderssetrecipients: + gpanders
2021-08-21 03:22:27gpanderssetmessageid: <1629516147.02.0.928809585196.issue44967@roundup.psfhosted.org>
2021-08-21 03:22:27gpanderslinkissue44967 messages
2021-08-21 03:22:26gpanderscreate