Skip to content

Commit

Permalink
[PR #7043/bee613d0 backport][3.10] Add clarification about `GracefulE…
Browse files Browse the repository at this point in the history
…xit` when using `handle_signals=True` (#9122)

**This is a backport of PR #7043 as merged into master
(bee613d).**

Co-authored-by: Daste <stefankar1000@gmail.com>
  • Loading branch information
patchback[bot] and Daste745 authored Sep 11, 2024
1 parent 89951ec commit fb6726f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/4414.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarified that ``GracefulExit`` needs to be handled in ``AppRunner`` and ``ServerRunner`` when using ``handle_signals=True``. -- by :user:`Daste745`
16 changes: 14 additions & 2 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,8 @@ application on specific TCP or Unix socket, e.g.::
:param bool handle_signals: add signal handlers for
:data:`signal.SIGINT` and
:data:`signal.SIGTERM` (``False`` by
default).
default). These handlers will raise
:exc:`GracefulExit`.

:param kwargs: named parameters to pass into
web protocol.
Expand Down Expand Up @@ -2807,7 +2808,8 @@ application on specific TCP or Unix socket, e.g.::
:param bool handle_signals: add signal handlers for
:data:`signal.SIGINT` and
:data:`signal.SIGTERM` (``False`` by
default).
default). These handlers will raise
:exc:`GracefulExit`.

:param kwargs: named parameters to pass into
web protocol.
Expand Down Expand Up @@ -2938,6 +2940,16 @@ application on specific TCP or Unix socket, e.g.::

``128`` by default.

.. exception:: GracefulExit

Raised by signal handlers for :data:`signal.SIGINT` and :data:`signal.SIGTERM`
defined in :class:`AppRunner` and :class:`ServerRunner`
when ``handle_signals`` is set to ``True``.

Inherited from :exc:`SystemExit`,
which exits with error code ``1`` if not handled.


Utilities
---------

Expand Down

0 comments on commit fb6726f

Please sign in to comment.