mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Updated all import statements to use the new socketserver module name.
Renamed socketserver module in its own documentation. Renamed documentation references.
This commit is contained in:
parent
fb9ce65a91
commit
d192c925ac
14 changed files with 61 additions and 64 deletions
|
@ -5,7 +5,7 @@ connect to the Idle process, which listens for the connection. Since Idle has
|
|||
has only one client per server, this was not a limitation.
|
||||
|
||||
+---------------------------------+ +-------------+
|
||||
| SocketServer.BaseRequestHandler | | SocketIO |
|
||||
| socketserver.BaseRequestHandler | | SocketIO |
|
||||
+---------------------------------+ +-------------+
|
||||
^ | register() |
|
||||
| | unregister()|
|
||||
|
@ -31,7 +31,7 @@ import sys
|
|||
import os
|
||||
import socket
|
||||
import select
|
||||
import SocketServer
|
||||
import socketserver
|
||||
import struct
|
||||
import cPickle as pickle
|
||||
import threading
|
||||
|
@ -66,12 +66,12 @@ copyreg.pickle(types.CodeType, pickle_code, unpickle_code)
|
|||
BUFSIZE = 8*1024
|
||||
LOCALHOST = '127.0.0.1'
|
||||
|
||||
class RPCServer(SocketServer.TCPServer):
|
||||
class RPCServer(socketserver.TCPServer):
|
||||
|
||||
def __init__(self, addr, handlerclass=None):
|
||||
if handlerclass is None:
|
||||
handlerclass = RPCHandler
|
||||
SocketServer.TCPServer.__init__(self, addr, handlerclass)
|
||||
socketserver.TCPServer.__init__(self, addr, handlerclass)
|
||||
|
||||
def server_bind(self):
|
||||
"Override TCPServer method, no bind() phase for connecting entity"
|
||||
|
@ -492,7 +492,7 @@ class RemoteProxy(object):
|
|||
def __init__(self, oid):
|
||||
self.oid = oid
|
||||
|
||||
class RPCHandler(SocketServer.BaseRequestHandler, SocketIO):
|
||||
class RPCHandler(socketserver.BaseRequestHandler, SocketIO):
|
||||
|
||||
debugging = False
|
||||
location = "#S" # Server
|
||||
|
@ -500,10 +500,10 @@ class RPCHandler(SocketServer.BaseRequestHandler, SocketIO):
|
|||
def __init__(self, sock, addr, svr):
|
||||
svr.current_handler = self ## cgt xxx
|
||||
SocketIO.__init__(self, sock)
|
||||
SocketServer.BaseRequestHandler.__init__(self, sock, addr, svr)
|
||||
socketserver.BaseRequestHandler.__init__(self, sock, addr, svr)
|
||||
|
||||
def handle(self):
|
||||
"handle() method required by SocketServer"
|
||||
"handle() method required by socketserver"
|
||||
self.mainloop()
|
||||
|
||||
def get_remote_proxy(self, oid):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue