Issue #27891: Consistently group and sort imports within idlelib modules.

This commit is contained in:
Terry Jan Reedy 2016-08-31 00:50:55 -04:00
parent 89b1162511
commit bfbaa6b206
47 changed files with 200 additions and 125 deletions

View file

@ -26,23 +26,21 @@ See the Idle run.main() docstring for further information on how this was
accomplished in Idle.
"""
import sys
import os
import builtins
import copyreg
import io
import socket
import marshal
import os
import pickle
import queue
import select
import socket
import socketserver
import struct
import pickle
import sys
import threading
import queue
import traceback
import copyreg
import types
import marshal
import builtins
def unpickle_code(ms):
co = marshal.loads(ms)
@ -60,10 +58,12 @@ def dumps(obj, protocol=None):
p.dump(obj)
return f.getvalue()
class CodePickler(pickle.Pickler):
dispatch_table = {types.CodeType: pickle_code}
dispatch_table.update(copyreg.dispatch_table)
BUFSIZE = 8*1024
LOCALHOST = '127.0.0.1'
@ -487,16 +487,19 @@ class RemoteObject(object):
# Token mix-in class
pass
def remoteref(obj):
oid = id(obj)
objecttable[oid] = obj
return RemoteProxy(oid)
class RemoteProxy(object):
def __init__(self, oid):
self.oid = oid
class RPCHandler(socketserver.BaseRequestHandler, SocketIO):
debugging = False
@ -514,6 +517,7 @@ class RPCHandler(socketserver.BaseRequestHandler, SocketIO):
def get_remote_proxy(self, oid):
return RPCProxy(self, oid)
class RPCClient(SocketIO):
debugging = False
@ -539,6 +543,7 @@ class RPCClient(SocketIO):
def get_remote_proxy(self, oid):
return RPCProxy(self, oid)
class RPCProxy(object):
__methods = None
@ -587,6 +592,7 @@ def _getattributes(obj, attributes):
if not callable(attr):
attributes[name] = 1
class MethodProxy(object):
def __init__(self, sockio, oid, name):