[Python-checkins] cpython (merge 3.3 -> default): Merge #11109: clean up docs, add whatsnew entry, and fix Justin's last name.
r.david.murray
python-checkins at python.org
Tue Oct 2 03:48:13 CEST 2012
http://hg.python.org/cpython/rev/1234300bc056
changeset: 79395:1234300bc056
parent: 79393:f3ed5e211fcc
parent: 79394:991c24b8969d
user: R David Murray <rdmurray at bitdance.com>
date: Mon Oct 01 21:47:57 2012 -0400
summary:
Merge #11109: clean up docs, add whatsnew entry, and fix Justin's last name.
files:
Doc/library/socketserver.rst | 18 ++++++++++--------
Doc/whatsnew/3.3.rst | 10 ++++++++++
Lib/socketserver.py | 2 +-
Misc/HISTORY | 4 ++--
4 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst
--- a/Doc/library/socketserver.rst
+++ b/Doc/library/socketserver.rst
@@ -153,20 +153,22 @@
.. method:: BaseServer.serve_forever(poll_interval=0.5)
- Handle requests until an explicit :meth:`shutdown` request.
- Poll for shutdown every *poll_interval* seconds. Ignores :attr:`self.timeout`. It also calls
- :meth:`service_actions` which may be used by a subclass or Mixin to provide
- various cleanup actions. For e.g. ForkingMixin class uses
- :meth:`service_actions` to cleanup the zombie child processes.
+ Handle requests until an explicit :meth:`shutdown` request. Poll for
+ shutdown every *poll_interval* seconds. Ignores :attr:`self.timeout`. It
+ also calls :meth:`service_actions`, which may be used by a subclass or mixin
+ to provide actions specific to a given service. For example, the
+ :class:`ForkingMixIn` class uses :meth:`service_actions` to clean up zombie
+ child processes.
.. versionchanged:: 3.3
- Added service_actions call to the serve_forever method.
+ Added ``service_actions`` call to the ``serve_forever`` method.
.. method:: BaseServer.service_actions()
- This is called by the serve_forever loop. This method is can be overridden
- by Mixin's to add cleanup or service specific actions.
+ This is called in the :meth:`serve_forever` loop. This method is can be
+ overridden by subclasses or mixin classes to perform actions specific to
+ a given service, such as cleanup actions.
.. versionadded:: 3.3
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -1805,6 +1805,16 @@
(Contributed by Ross Lagerwall in :issue:`10866`.)
+socketserver
+------------
+
+:class:`~socketserver.BaseServer` now has an overridable method
+:meth:`~socketserver.BaseServer.service_actions` that is called by the
+:meth:`~socketserver.BaseServer.serve_forever` method in the service loop.
+:class:`~socketserver.ForkingMixIn` now uses this to clean up zombie
+child proceses. (Contributed by Justin Warkentin in :issue:`11109`.)
+
+
sqlite3
-------
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
--- a/Lib/socketserver.py
+++ b/Lib/socketserver.py
@@ -562,7 +562,7 @@
self.collect_children()
def service_actions(self):
- """Collect the zombie child processes regularly in the ForkingMixin.
+ """Collect the zombie child processes regularly in the ForkingMixIn.
service_actions is called in the BaseServer's serve_forver loop.
"""
diff --git a/Misc/HISTORY b/Misc/HISTORY
--- a/Misc/HISTORY
+++ b/Misc/HISTORY
@@ -3187,8 +3187,8 @@
- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError
if the file is closed.
-- Issue #11109: New service_action method for BaseServer, used by ForkingMixin
- class for cleanup. Initial Patch by Justin Wark.
+- Issue #11109: New service_action method for BaseServer, used by ForkingMixIn
+ class for cleanup. Initial Patch by Justin Warkentin.
- Issue #12045: Avoid duplicate execution of command in
ctypes.util._get_soname(). Patch by Sijin Joseph.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list