3232from _pytest ._io import TerminalWriter
3333from _pytest ._io .saferepr import safeformat
3434from _pytest ._io .saferepr import saferepr
35+ from _pytest .compat import ATTRS_EQ_FIELD
3536from _pytest .compat import overload
3637from _pytest .compat import TYPE_CHECKING
3738
@@ -911,7 +912,7 @@ def repr_excinfo(self, excinfo: ExceptionInfo) -> "ExceptionChainRepr":
911912 return ExceptionChainRepr (repr_chain )
912913
913914
914- @attr .s
915+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
915916class TerminalRepr :
916917 def __str__ (self ) -> str :
917918 # FYI this is called from pytest-xdist's serialization of exception
@@ -928,7 +929,7 @@ def toterminal(self, tw: TerminalWriter) -> None:
928929 raise NotImplementedError ()
929930
930931
931- @attr .s
932+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
932933class ExceptionRepr (TerminalRepr ):
933934 def __attrs_post_init__ (self ):
934935 self .sections = [] # type: List[Tuple[str, str, str]]
@@ -942,7 +943,7 @@ def toterminal(self, tw: TerminalWriter) -> None:
942943 tw .line (content )
943944
944945
945- @attr .s
946+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
946947class ExceptionChainRepr (ExceptionRepr ):
947948 chain = attr .ib (
948949 type = Sequence [
@@ -966,7 +967,7 @@ def toterminal(self, tw: TerminalWriter) -> None:
966967 super ().toterminal (tw )
967968
968969
969- @attr .s
970+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
970971class ReprExceptionInfo (ExceptionRepr ):
971972 reprtraceback = attr .ib (type = "ReprTraceback" )
972973 reprcrash = attr .ib (type = "ReprFileLocation" )
@@ -976,7 +977,7 @@ def toterminal(self, tw: TerminalWriter) -> None:
976977 super ().toterminal (tw )
977978
978979
979- @attr .s
980+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
980981class ReprTraceback (TerminalRepr ):
981982 reprentries = attr .ib (type = Sequence [Union ["ReprEntry" , "ReprEntryNative" ]])
982983 extraline = attr .ib (type = Optional [str ])
@@ -1010,7 +1011,7 @@ def __init__(self, tblines: Sequence[str]) -> None:
10101011 self .extraline = None
10111012
10121013
1013- @attr .s
1014+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
10141015class ReprEntryNative (TerminalRepr ):
10151016 lines = attr .ib (type = Sequence [str ])
10161017 style = "native" # type: _TracebackStyle
@@ -1019,7 +1020,7 @@ def toterminal(self, tw: TerminalWriter) -> None:
10191020 tw .write ("" .join (self .lines ))
10201021
10211022
1022- @attr .s
1023+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
10231024class ReprEntry (TerminalRepr ):
10241025 lines = attr .ib (type = Sequence [str ])
10251026 reprfuncargs = attr .ib (type = Optional ["ReprFuncArgs" ])
@@ -1100,7 +1101,7 @@ def __str__(self) -> str:
11001101 )
11011102
11021103
1103- @attr .s
1104+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
11041105class ReprFileLocation (TerminalRepr ):
11051106 path = attr .ib (type = str , converter = str )
11061107 lineno = attr .ib (type = int )
@@ -1117,7 +1118,7 @@ def toterminal(self, tw: TerminalWriter) -> None:
11171118 tw .line (":{}: {}" .format (self .lineno , msg ))
11181119
11191120
1120- @attr .s
1121+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
11211122class ReprLocals (TerminalRepr ):
11221123 lines = attr .ib (type = Sequence [str ])
11231124
@@ -1126,7 +1127,7 @@ def toterminal(self, tw: TerminalWriter, indent="") -> None:
11261127 tw .line (indent + line )
11271128
11281129
1129- @attr .s
1130+ @attr .s ( ** { ATTRS_EQ_FIELD : False }) # type: ignore
11301131class ReprFuncArgs (TerminalRepr ):
11311132 args = attr .ib (type = Sequence [Tuple [str , object ]])
11321133
0 commit comments