Mercurial > hg
comparison mercurial/pycompat.py @ 29433:33770d2b6cf9
py3: conditionalize SocketServer import
The SocketServer is renamed to socketserver in python 3
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 27 Jun 2016 16:48:54 +0530 |
parents | 34b914ac573e |
children | 0c741fd6158a |
comparison
equal
deleted
inserted
replaced
29432:34b914ac573e | 29433:33770d2b6cf9 |
---|---|
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 SocketServer as socketserver | |
22 socketserver.ThreadingMixIn | |
23 except ImportError: | |
24 import socketserver | |
25 socketserver.ThreadingMixIn | |
19 | 26 |
20 try: | 27 try: |
21 import xmlrpclib | 28 import xmlrpclib |
22 xmlrpclib.Transport | 29 xmlrpclib.Transport |
23 except ImportError: | 30 except ImportError: |