diff --git a/_pytest/assertion/util.py b/_pytest/assertion/util.py index 5a380ae09..71ad48251 100644 --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -5,7 +5,11 @@ import pprint import _pytest._code import py import six -from collections import Sequence +import sys +if sys.version_info >= (3, 4): + from collections.abc import Sequence +else: + from collections import Sequence u = six.text_type diff --git a/_pytest/mark/structures.py b/_pytest/mark/structures.py index c56972980..c52fbd277 100644 --- a/_pytest/mark/structures.py +++ b/_pytest/mark/structures.py @@ -1,4 +1,9 @@ -from collections import namedtuple, MutableMapping as MappingMixin +import sys +if sys.version_info >= (3, 4): + from collections.abc import MutableMapping as MappingMixin +else: + from collections import MutableMapping as MappingMixin +from collections import namedtuple import warnings from operator import attrgetter import inspect