Mercurial > hg
comparison mercurial/pycompat.py @ 29432:34b914ac573e
py3: conditionalize xmlrpclib import
The xmlrpclib library is renamed to xmlrpc.client in python 3
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 27 Jun 2016 16:37:37 +0530 |
parents | 80880ad3fccd |
children | 33770d2b6cf9 |
comparison
equal
deleted
inserted
replaced
29431:80880ad3fccd | 29432:34b914ac573e |
---|---|
14 import cPickle as pickle | 14 import cPickle as pickle |
15 pickle.dumps | 15 pickle.dumps |
16 except ImportError: | 16 except ImportError: |
17 import pickle | 17 import pickle |
18 pickle.dumps # silence pyflakes | 18 pickle.dumps # silence pyflakes |
19 | |
20 try: | |
21 import xmlrpclib | |
22 xmlrpclib.Transport | |
23 except ImportError: | |
24 import xmlrpc.client as xmlrpclib | |
25 xmlrpclib.Transport | |
19 | 26 |
20 try: | 27 try: |
21 import urlparse | 28 import urlparse |
22 urlparse.urlparse | 29 urlparse.urlparse |
23 except ImportError: | 30 except ImportError: |