From 25800cabfeb2e1d2bb9163974d535693ff6edde0 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Mon, 29 Oct 2018 11:01:34 +0800 Subject: [PATCH] fix #415: ordered_dict error in Python 2.7 --- httprunner/compat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/httprunner/compat.py b/httprunner/compat.py index ae88f4c9..72716b22 100644 --- a/httprunner/compat.py +++ b/httprunner/compat.py @@ -7,6 +7,7 @@ httprunner.compat This module handles import compatibility issues between Python 2 and Python 3. """ +from collections import OrderedDict try: import simplejson as json @@ -39,8 +40,6 @@ except AttributeError: JSONDecodeError = ValueError if is_py2: - from urllib3.packages.ordered_dict import OrderedDict - builtin_str = str bytes = str str = unicode @@ -51,8 +50,6 @@ if is_py2: FileNotFoundError = IOError elif is_py3: - from collections import OrderedDict - builtin_str = str str = str bytes = bytes