[Python-checkins] cpython: #13973: move a couple of imports at module level. Patch by Tshepang

ezio.melotti python-checkins at python.org
Fri Feb 24 11:44:17 CET 2012


http://hg.python.org/cpython/rev/a3e8f8d10dce
changeset:   75237:a3e8f8d10dce
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Fri Feb 24 12:44:04 2012 +0200
summary:
  #13973: move a couple of imports at module level.  Patch by Tshepang Lekhonkhobe.

files:
  Lib/xmlrpc/client.py |  3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -132,6 +132,7 @@
 import time
 from datetime import datetime
 import http.client
+import urllib.parse
 from xml.parsers import expat
 import socket
 import errno
@@ -1190,7 +1191,6 @@
         if isinstance(host, tuple):
             host, x509 = host
 
-        import urllib.parse
         auth, host = urllib.parse.splituser(host)
 
         if auth:
@@ -1383,7 +1383,6 @@
         # establish a "logical" server connection
 
         # get the url
-        import urllib.parse
         type, uri = urllib.parse.splittype(uri)
         if type not in ("http", "https"):
             raise IOError("unsupported XML-RPC protocol")

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list