mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
#13973: move a couple of imports at module level. Patch by Tshepang Lekhonkhobe.
This commit is contained in:
parent
2fe4bb10e7
commit
91932da338
1 changed files with 1 additions and 2 deletions
|
@ -132,6 +132,7 @@ import sys
|
|||
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 @@ class Transport:
|
|||
if isinstance(host, tuple):
|
||||
host, x509 = host
|
||||
|
||||
import urllib.parse
|
||||
auth, host = urllib.parse.splituser(host)
|
||||
|
||||
if auth:
|
||||
|
@ -1383,7 +1383,6 @@ class ServerProxy:
|
|||
# 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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue