gh-100557: Clarify signal.pause() docs to explain it only wakes on handled signals#148723
gh-100557: Clarify signal.pause() docs to explain it only wakes on handled signals#148723EoinTrial wants to merge 2 commits intopython:mainfrom
Conversation
…alueError and IndexError
… on handled signals
picnixz
left a comment
There was a problem hiding this comment.
I do not think we need to update the docstring as this is the short doc of the manpage. We do wait until a signal arrives. Arriving means getting caught by some handler, otherwise you cannot determine that it "arrived".
If the online docs are already clear, there is no need to overcomplicate the docstring itself.
|
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 |
The current docs for
signal.pause()state only "Wait until a signal arrives." This is incomplete to the point of being wrong:pause(2)only returns control if a signal is delivered that has a handler installed. Signals that are being ignored do not interruptpause().This PR updates the Clinic docstring in
Modules/signalmodule.c(and the generatedModules/clinic/signalmodule.c.h) to accurately describe this behaviour.Note: the
input=hash in the[clinic end generated code]comment will need to be updated by runningmake clinicbefore merging.signal.pauseis incorrect #100557📚 Documentation preview 📚: https://cpython-previews--148723.org.readthedocs.build/