##// END OF EJS Templates
py3: conditionalize the urlparse import...
Pulkit Goyal -
r29431:80880ad3 default
parent child Browse files
Show More
@@ -281,7 +281,6 b' from __future__ import absolute_import'
281 281
282 282 import re
283 283 import time
284 import urlparse
285 284 import xmlrpclib
286 285
287 286 from mercurial.i18n import _
@@ -293,6 +292,8 b' from mercurial import ('
293 292 util,
294 293 )
295 294
295 urlparse = util.urlparse
296
296 297 # Note for extension authors: ONLY specify testedwith = 'internal' for
297 298 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
298 299 # be specifying the version(s) of Mercurial they are tested with, or
@@ -18,6 +18,13 b' except ImportError:'
18 18 pickle.dumps # silence pyflakes
19 19
20 20 try:
21 import urlparse
22 urlparse.urlparse
23 except ImportError:
24 import urllib.parse as urlparse
25 urlparse.urlparse
26
27 try:
21 28 import cStringIO as io
22 29 stringio = io.StringIO
23 30 except ImportError:
@@ -50,6 +50,7 b' for attr in ('
50 50 'pickle',
51 51 'queue',
52 52 'urlerr',
53 'urlparse',
53 54 # we do import urlreq, but we do it outside the loop
54 55 #'urlreq',
55 56 'stringio',
@@ -26,7 +26,7 b''
26 26 doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
27 27 hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
28 28 hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
29 hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob)
29 hgext/bugzilla.py: error importing module: <ImportError> No module named 'xmlrpclib' (line *) (glob)
30 30 hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
31 31 hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
32 32 hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
@@ -20,7 +20,10 b' import os'
20 20 import select
21 21 import socket
22 22 import sys
23 import urlparse
23
24 from mercurial import util
25
26 urlparse = util.urlparse
24 27
25 28 class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
26 29 __base = BaseHTTPServer.BaseHTTPRequestHandler
General Comments 0
You need to be logged in to leave comments. Login now