From: Vinay Sajip Date: Fri, 16 Aug 2013 23:40:38 +0000 (+0100) Subject: Issue #18759: Merged updates from 3.3. X-Git-Tag: v3.4.0a2~202 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07b16615bc0181cb6f1334ee170c196cdb3b288a;p=thirdparty%2FPython%2Fcpython.git Issue #18759: Merged updates from 3.3. --- 07b16615bc0181cb6f1334ee170c196cdb3b288a diff --cc Doc/library/logging.config.rst index 16d3294832f4,e34e010984c4..37f29a09fb7c --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@@ -122,21 -101,11 +122,22 @@@ in :mod:`logging` itself) and defining configurations. If no port is specified, the module's default :const:`DEFAULT_LOGGING_CONFIG_PORT` is used. Logging configurations will be sent as a file suitable for processing by :func:`fileConfig`. Returns a - :class:`Thread` instance on which you can call :meth:`start` to start the - server, and which you can :meth:`join` when appropriate. To stop the server, + :class:`~threading.Thread` instance on which you can call + :meth:`~threading.Thread.start` to start the server, and which you can + :meth:`~threading.Thread.join` when appropriate. To stop the server, call :func:`stopListening`. + The ``verify`` argument, if specified, should be a callable which should + verify whether bytes received across the socket are valid and should be + processed. This could be done by encrypting and/or signing what is sent + across the socket, such that the ``verify`` callable can perform + signature verification and/or decryption. The ``verify`` callable is called + with a single argument - the bytes received across the socket - and should + return the bytes to be processed, or None to indicate that the bytes should + be discarded. The returned bytes could be the same as the passed in bytes + (e.g. when only verification is done), or they could be completely different + (perhaps if decryption were performed). + To send a configuration to the socket, read in the configuration file and send it to the socket as a string of bytes preceded by a four-byte length string packed in binary using ``struct.pack('>L', n)``.