]> granicus.if.org Git - python/commitdiff
#11109: clean up docs, add whatsnew entry, and fix Justin's last name.
authorR David Murray <rdmurray@bitdance.com>
Tue, 2 Oct 2012 01:43:46 +0000 (21:43 -0400)
committerR David Murray <rdmurray@bitdance.com>
Tue, 2 Oct 2012 01:43:46 +0000 (21:43 -0400)
Doc/library/socketserver.rst
Doc/whatsnew/3.3.rst
Lib/socketserver.py
Misc/NEWS

index 7dc0cc73d674816832863474aa97c97bfc30e1b8..28e8a0aff762800c3940721e8eabe99157da2425 100644 (file)
@@ -153,20 +153,22 @@ Server Objects
 
 .. 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
 
index ee4fde49d87e533f39bedb77626bb41aa0dcce54..c4065b314c2010b5c31c2038c770ac489843daa3 100644 (file)
@@ -1805,6 +1805,16 @@ socket
   (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
 -------
 
index 261e28e6415e5194cd10a7a02eeeb2674af39f22..a21318d92373903725006a59f71bc14e4ff6825a 100644 (file)
@@ -562,7 +562,7 @@ class ForkingMixIn:
         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.
         """
index 2e735f785b0e96aec61e0b916c4b8179d791ef20..83d6b00c311fee3859bf5bb5062178635e0edbbd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -3296,7 +3296,7 @@ Library
   if the file is closed.
 
 - Issue #11109: New service_action method for BaseServer, used by ForkingMixin
-  class for cleanup. Initial Patch by Justin Wark.
+  class for cleanup. Initial Patch by Justin Warkentin.
 
 - Issue #12045: Avoid duplicate execution of command in
   ctypes.util._get_soname().  Patch by Sijin Joseph.