Skip to content

[3.13] Reword atexit docs (GH-156086) - #156889

Merged
encukou merged 2 commits into
python:3.13from
encukou:backport-1d28836-3.13
Sep 4, 2026
Merged

[3.13] Reword atexit docs (GH-156086)#156889
encukou merged 2 commits into
python:3.13from
encukou:backport-1d28836-3.13

Conversation

@encukou

@encukou encukou commented Sep 3, 2026

Copy link
Copy Markdown
Member

For the atexit module:

  • Move common info from register to the module level (a lot of this was duplicated -- less maintainable and harder to read)
  • Use interpreter shutdown consistently, introducing it as a more general term for the old docs' program termination.
  • Use the term exit handler consistently
  • Move warning for a mitigated footgun to a change entry
  • Add a new warning about keeping things usable

Similarly clarify docs for the atexit attribute in weakref.

(cherry picked from commit 1d28836)

For the `atexit` module:

- Move common info from `register` to the module level (a lot of this
  was duplicated -- less maintainable and harder to read)
- Use *interpreter shutdown* consistently, introducing it as a more
  general term for the old docs' *program termination*.
- Use the term *exit handler* consistently
- Move warning for a mitigated footgun to a change entry
- Add a new warning about keeping things usable

Similarly clarify docs for the `atexit` attribute in `weakref`.
(cherry picked from commit 1d28836)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@read-the-docs-community

read-the-docs-community Bot commented Sep 3, 2026

Copy link
Copy Markdown

Comment thread Doc/library/atexit.rst
@encukou
encukou merged commit 8e09add into python:3.13 Sep 4, 2026
28 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 4, 2026
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

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant