From 3fc2c94b5e105421c3d554d92ac07eb289d56289 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 29 Mar 2018 23:15:03 -0300 Subject: [PATCH] Switch imports based on python versions, my bad --- _pytest/compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_pytest/compat.py b/_pytest/compat.py index a4ec25212..bcb31cb88 100644 --- a/_pytest/compat.py +++ b/_pytest/compat.py @@ -38,11 +38,11 @@ PY35 = sys.version_info[:2] >= (3, 5) PY36 = sys.version_info[:2] >= (3, 6) MODULE_NOT_FOUND_ERROR = 'ModuleNotFoundError' if PY36 else 'ImportError' -if _PY2: - # those raise DeprecationWarnings in Python >=3.7 +if _PY3: from collections.abc import MutableMapping as MappingMixin # noqa from collections.abc import Sequence # noqa else: + # those raise DeprecationWarnings in Python >=3.7 from collections import MutableMapping as MappingMixin # noqa from collections import Sequence # noqa