Mercurial > hg
diff mercurial/pycompat.py @ 29431:80880ad3fccd
py3: conditionalize the urlparse import
The urlparse library is renamed to urllib.parse in python 3
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 27 Jun 2016 16:16:10 +0530 |
parents | 2646fbba4ca7 |
children | 34b914ac573e |
line wrap: on
line diff
--- a/mercurial/pycompat.py Mon Jun 27 15:53:38 2016 +0530 +++ b/mercurial/pycompat.py Mon Jun 27 16:16:10 2016 +0530 @@ -18,6 +18,13 @@ pickle.dumps # silence pyflakes try: + import urlparse + urlparse.urlparse +except ImportError: + import urllib.parse as urlparse + urlparse.urlparse + +try: import cStringIO as io stringio = io.StringIO except ImportError: