Skip to content

gh-100557: Clarify signal.pause() docs to explain it only wakes on handled signals#148723

Closed
EoinTrial wants to merge 2 commits intopython:mainfrom
EoinTrial:fix/signal-pause-docs
Closed

gh-100557: Clarify signal.pause() docs to explain it only wakes on handled signals#148723
EoinTrial wants to merge 2 commits intopython:mainfrom
EoinTrial:fix/signal-pause-docs

Conversation

@EoinTrial
Copy link
Copy Markdown

@EoinTrial EoinTrial commented Apr 18, 2026

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 interrupt pause().

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 running make clinic before merging.


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

Copy link
Copy Markdown
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 19, 2026

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@EoinTrial
Copy link
Copy Markdown
Author

@picnixz Thanks for reviewing! I've opened a new PR #148760 that drops the C docstring change and only updates Doc/library/signal.rst instead.

@EoinTrial EoinTrial closed this Apr 19, 2026
@EoinTrial EoinTrial deleted the fix/signal-pause-docs branch April 19, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants