File attrs.patch of Package python-pytest.14582

Index: pytest-3.10.1/src/_pytest/compat.py
===================================================================
--- pytest-3.10.1.orig/src/_pytest/compat.py
+++ pytest-3.10.1/src/_pytest/compat.py
@@ -12,6 +12,7 @@ import re
 import sys
 from contextlib import contextmanager
 
+import attr
 import py
 import six
 from six import text_type
@@ -447,3 +448,8 @@ if six.PY2:
 
 else:
     from functools import lru_cache  # noqa: F401
+
+if getattr(attr, "__version_info__", ()) >= (19, 2):
+    ATTRS_EQ_FIELD = "eq"
+else:
+    ATTRS_EQ_FIELD = "cmp"
Index: pytest-3.10.1/src/_pytest/mark/structures.py
===================================================================
--- pytest-3.10.1.orig/src/_pytest/mark/structures.py
+++ pytest-3.10.1/src/_pytest/mark/structures.py
@@ -10,6 +10,7 @@ from six.moves import map
 from ..compat import getfslineno
 from ..compat import MappingMixin
 from ..compat import NOTSET
+from ..compat import ATTRS_EQ_FIELD
 from ..deprecated import MARK_INFO_ATTRIBUTE
 from ..deprecated import MARK_PARAMETERSET_UNPACKING
 from _pytest.outcomes import fail
@@ -440,7 +441,8 @@ class NodeKeywords(MappingMixin):
         return "<NodeKeywords for node %s>" % (self.node,)
 
 
-@attr.s(cmp=False, hash=False)
+# mypy cannot find this overload, remove when on attrs>=19.2
+@attr.s(hash=False, **{ATTRS_EQ_FIELD: False})  # type: ignore
 class NodeMarkers(object):
     """
     internal structure for storing marks belonging to a node
openSUSE Build Service is sponsored by