]> granicus.if.org Git - python/commitdiff
SF patch #834015: Remove imports of unused modules
authorRaymond Hettinger <python@rcn.com>
Sun, 2 Nov 2003 09:47:05 +0000 (09:47 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 2 Nov 2003 09:47:05 +0000 (09:47 +0000)
(Contributed by George Yoshida.)

Lib/SimpleXMLRPCServer.py
Lib/platform.py
Lib/posixpath.py
Lib/trace.py
Lib/xmlrpclib.py

index 8ffa2441c0617cc5d41b5a6a62722bc1fbf6c1be..fdde60c7ce46cc3408f32dc3040ba09021ddc1fa 100644 (file)
@@ -104,7 +104,6 @@ from xmlrpclib import Fault
 import SocketServer
 import BaseHTTPServer
 import sys
-import types
 import os
 
 def resolve_dotted_attribute(obj, attr):
index 1547e1247fe7c339e84ed3d382918fc20ec99abc..31c47b4c9ad0120c5f03716e7d50cbf3d0b9d22d 100755 (executable)
@@ -1082,7 +1082,6 @@ def _sys_version():
 
     """
     global _sys_version_cache
-    import time
 
     if _sys_version_cache is not None:
         return _sys_version_cache
index 58e8eedcec97834807a1ea73dfff8ca496b833ff..7f907ef519c1d48f4bd6228d7422993047b6e01a 100644 (file)
@@ -10,7 +10,6 @@ Some of this can actually be useful on non-Posix systems too, e.g.
 for manipulation of the pathname component of URLs.
 """
 
-import sys
 import os
 import stat
 
index 7f412633cf809af1f60fea94e9c11c130d12e02e..b694c150212f3a0414845a2c0c2eb07ab39040d3 100644 (file)
@@ -46,7 +46,6 @@ Sample use, programmatically
 """
 
 import linecache
-import marshal
 import os
 import re
 import sys
index f06cfd7025700124ffb75031deebbad9166191c7..2466e25fe9d78418b6331cbc726d7e1e7408d1a9 100644 (file)
@@ -109,7 +109,7 @@ Exported classes:
 
   ServerProxy    Represents a logical connection to an XML-RPC server
 
-  MultiCall      Executor of boxcared xmlrpc requests 
+  MultiCall      Executor of boxcared xmlrpc requests
   Boolean        boolean wrapper to generate a "boolean" XML-RPC value
   DateTime       dateTime wrapper for an ISO 8601 string or time tuple or
                  localtime integer value to generate a "dateTime.iso8601"
@@ -894,7 +894,7 @@ class _MultiCallMethod:
 def MultiCallIterator(results):
     """Iterates over the results of a multicall. Exceptions are
     thrown in response to xmlrpc faults."""
-    
+
     for i in results:
         if type(i) == type({}):
             raise Fault(i['faultCode'], i['faultString'])
@@ -903,7 +903,7 @@ def MultiCallIterator(results):
         else:
             raise ValueError,\
                   "unexpected type in multicall result"
-        
+
 class MultiCall:
     """server -> a object used to boxcar method calls
 
@@ -920,14 +920,14 @@ class MultiCall:
 
     add_result, address = multicall()
     """
-    
+
     def __init__(self, server):
         self.__server = server
         self.__call_list = []
-        
+
     def __repr__(self):
         return "<MultiCall at %x>" % id(self)
-    
+
     __str__ = __repr__
 
     def __getattr__(self, name):
@@ -939,7 +939,7 @@ class MultiCall:
             marshalled_list.append({'methodName' : name, 'params' : args})
 
         return MultiCallIterator(self.__server.system.multicall(marshalled_list))
-        
+
 # --------------------------------------------------------------------
 # convenience functions
 
@@ -1071,7 +1071,6 @@ def loads(data):
     If the XML-RPC packet represents a fault condition, this function
     raises a Fault exception.
     """
-    import sys
     p, u = getparser()
     p.feed(data)
     p.close()
@@ -1392,7 +1391,7 @@ class ServerProxy:
             )
 
     __str__ = __repr__
-    
+
     def __getattr__(self, name):
         # magic method dispatcher
         return _Method(self.__request, name)