[Python-checkins] cpython (2.7): Fix casing of SocketServer module in 2.7.
georg.brandl
python-checkins at python.org
Sat Aug 11 11:12:46 CEST 2012
http://hg.python.org/cpython/rev/e06ef4881136
changeset: 78503:e06ef4881136
branch: 2.7
user: Georg Brandl <georg at python.org>
date: Sat Aug 11 11:12:55 2012 +0200
summary:
Fix casing of SocketServer module in 2.7.
files:
Doc/howto/logging-cookbook.rst | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -295,17 +295,17 @@
logger2.warning('Jail zesty vixen who grabbed pay from quack.')
logger2.error('The five boxing wizards jump quickly.')
-At the receiving end, you can set up a receiver using the :mod:`socketserver`
+At the receiving end, you can set up a receiver using the :mod:`SocketServer`
module. Here is a basic working example::
import pickle
import logging
import logging.handlers
- import socketserver
+ import SocketServer
import struct
- class LogRecordStreamHandler(socketserver.StreamRequestHandler):
+ class LogRecordStreamHandler(SocketServer.StreamRequestHandler):
"""Handler for a streaming logging request.
This basically logs the record using whatever logging policy is
@@ -347,7 +347,7 @@
# cycles and network bandwidth!
logger.handle(record)
- class LogRecordSocketReceiver(socketserver.ThreadingTCPServer):
+ class LogRecordSocketReceiver(SocketServer.ThreadingTCPServer):
"""
Simple TCP socket-based logging receiver suitable for testing.
"""
@@ -357,7 +357,7 @@
def __init__(self, host='localhost',
port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,
handler=LogRecordStreamHandler):
- socketserver.ThreadingTCPServer.__init__(self, (host, port), handler)
+ SocketServer.ThreadingTCPServer.__init__(self, (host, port), handler)
self.abort = 0
self.timeout = 1
self.logname = None
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list