Mercurial > hg-stable
diff tests/get-with-headers.py @ 29455:0c741fd6158a
py3: conditionalize httplib import
The httplib library is renamed to http.client in python 3. So the
import is conditionalized and a test is added in check-code to warn
to use util.httplib
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 28 Jun 2016 16:01:53 +0530 |
parents | f4b31fcd5e72 |
children | e75463e3179f |
line wrap: on
line diff
--- a/tests/get-with-headers.py Wed Jun 29 19:43:27 2016 -0700 +++ b/tests/get-with-headers.py Tue Jun 28 16:01:53 2016 +0530 @@ -5,11 +5,16 @@ from __future__ import absolute_import, print_function -import httplib import json import os import sys +from mercurial import ( + util, +) + +httplib = util.httplib + try: import msvcrt msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)