##// END OF EJS Templates
py3: conditionalize httplib import...
Pulkit Goyal -
r29455:0c741fd6 default
parent child Browse files
Show More
@@ -330,6 +330,7 b' pypats = ['
330 330 (r'^import xmlrpclib', "don't use xmlrpclib, use util.xmlrpclib"),
331 331 (r'^import cPickle', "don't use cPickle, use util.pickle"),
332 332 (r'^import pickle', "don't use pickle, use util.pickle"),
333 (r'^import httplib', "don't use httplib, use util.httplib"),
333 334 (r'\.next\(\)', "don't use .next(), use next(...)"),
334 335
335 336 # rules depending on implementation of repquote()
@@ -9,7 +9,6 b''
9 9 from __future__ import absolute_import
10 10
11 11 import errno
12 import httplib
13 12 import os
14 13 import socket
15 14 import tempfile
@@ -27,6 +26,7 b' from . import ('
27 26 wireproto,
28 27 )
29 28
29 httplib = util.httplib
30 30 urlerr = util.urlerr
31 31 urlreq = util.urlreq
32 32
@@ -111,7 +111,6 b' from __future__ import absolute_import, '
111 111
112 112 import errno
113 113 import hashlib
114 import httplib
115 114 import socket
116 115 import sys
117 116 import thread
@@ -120,6 +119,7 b' from . import ('
120 119 util,
121 120 )
122 121
122 httplib = util.httplib
123 123 urlerr = util.urlerr
124 124 urlreq = util.urlreq
125 125
@@ -18,6 +18,13 b' except ImportError:'
18 18 pickle.dumps # silence pyflakes
19 19
20 20 try:
21 import httplib
22 httplib.HTTPException
23 except ImportError:
24 import http.client as httplib
25 httplib.HTTPException
26
27 try:
21 28 import SocketServer as socketserver
22 29 socketserver.ThreadingMixIn
23 30 except ImportError:
@@ -10,7 +10,6 b''
10 10 from __future__ import absolute_import
11 11
12 12 import base64
13 import httplib
14 13 import os
15 14 import socket
16 15
@@ -22,8 +21,9 b' from . import ('
22 21 sslutil,
23 22 util,
24 23 )
24
25 httplib = util.httplib
25 26 stringio = util.stringio
26
27 27 urlerr = util.urlerr
28 28 urlreq = util.urlreq
29 29
@@ -47,6 +47,7 b' from . import ('
47 47
48 48 for attr in (
49 49 'empty',
50 'httplib',
50 51 'pickle',
51 52 'queue',
52 53 'urlerr',
@@ -5,11 +5,16 b' a subset of the headers plus the body of'
5 5
6 6 from __future__ import absolute_import, print_function
7 7
8 import httplib
9 8 import json
10 9 import os
11 10 import sys
12 11
12 from mercurial import (
13 util,
14 )
15
16 httplib = util.httplib
17
13 18 try:
14 19 import msvcrt
15 20 msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
@@ -61,7 +61,7 b''
61 61 hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
62 62 hgext/largefiles/localstore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *) (glob)
63 63 hgext/largefiles/overrides.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob)
64 hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob)
64 hgext/largefiles/proto.py: error importing: <SyntaxError> invalid syntax (bundle2.py, line *) (error at httppeer.py:*) (glob)
65 65 hgext/largefiles/remotestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob)
66 66 hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
67 67 hgext/largefiles/storefactory.py: error importing: <SyntaxError> invalid syntax (bundle2.py, line *) (error at bundlerepo.py:*) (glob)
@@ -114,8 +114,8 b''
114 114 mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
115 115 mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
116 116 mercurial/httpconnection.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:*) (glob)
117 mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
118 mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
117 mercurial/httppeer.py: error importing module: <SyntaxError> invalid syntax (bundle2.py, line *) (line *) (glob)
118 mercurial/keepalive.py: error importing module: <ImportError> No module named 'thread' (line *) (glob)
119 119 mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
120 120 mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob)
121 121 mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
@@ -141,7 +141,7 b''
141 141 mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
142 142 mercurial/ui.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
143 143 mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
144 mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
144 mercurial/url.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:*) (glob)
145 145 mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob)
146 146 mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob)
147 147 mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
General Comments 0
You need to be logged in to leave comments. Login now