[Python-checkins] bpo-31233, bpo-31151: Document socketserver changes (#5417)
Victor Stinner
webhook-mailer at python.org
Mon Jan 29 06:10:25 EST 2018
https://github.com/python/cpython/commit/db8189bb8db609ca3993dec31fb95fdbe134469a
commit: db8189bb8db609ca3993dec31fb95fdbe134469a
branch: master
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-01-29T12:10:22+01:00
summary:
bpo-31233, bpo-31151: Document socketserver changes (#5417)
socketserver.ForkingMixIn.server_close() and
socketserver.ThreadingMixIn.server_close() now waits until all child
processes and non-daemonic threads complete.
files:
M Doc/library/socketserver.rst
M Doc/whatsnew/3.7.rst
diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst
index e12c8c97844f..560002738375 100644
--- a/Doc/library/socketserver.rst
+++ b/Doc/library/socketserver.rst
@@ -115,6 +115,21 @@ server classes.
:class:`ForkingMixIn` and the Forking classes mentioned below are
only available on POSIX platforms that support :func:`~os.fork`.
+ :meth:`socketserver.ForkingMixIn.server_close` waits until all child
+ processes complete.
+
+ :meth:`socketserver.ThreadingMixIn.server_close` waits until all non-daemon
+ threads complete. Use daemonic threads by setting
+ :data:`ThreadingMixIn.daemon_threads` to ``True`` to not wait until threads
+ complete.
+
+ .. versionchanged:: 3.7
+
+ :meth:`socketserver.ForkingMixIn.server_close` and
+ :meth:`socketserver.ThreadingMixIn.server_close` now waits until all
+ child processes and non-daemonic threads complete.
+
+
.. class:: ForkingTCPServer
ForkingUDPServer
ThreadingTCPServer
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 9979e6923990..b70945f4708e 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -1021,6 +1021,14 @@ Changes in Python behavior
Changes in the Python API
-------------------------
+* :meth:`socketserver.ThreadingMixIn.server_close` now waits until all
+ non-daemon threads complete. Use daemonic threads by setting
+ :data:`ThreadingMixIn.daemon_threads` to ``True`` to not wait until threads
+ complete. (Contributed by Victor Stinner in :issue:`31233`.)
+
+* :meth:`socketserver.ForkingMixIn.server_close` now waits until all
+ child processes complete. (Contributed by Victor Stinner in :issue:`31151`.)
+
* The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE``
locale to the ``LC_NUMERIC`` locale in some cases.
More information about the Python-checkins
mailing list