From 0d2fa12e9f8b46a251399307470044b09ea744cf Mon Sep 17 00:00:00 2001 From: Abhishek190204 <115422701+Abhishek190204@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:58:55 +0530 Subject: [PATCH] Issue : #9641 fixed changed the deprecated cmp argument on the attr.s decorator to newer version Issue : #9641 fixed --- synapse/crypto/keyring.py | 2 +- synapse/events/builder.py | 2 +- tests/server.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 643d2d4e66d..e167411a9fc 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -59,7 +59,7 @@ logger = logging.getLogger(__name__) -@attr.s(slots=True, frozen=True, cmp=False, auto_attribs=True) +@attr.s(slots=True, frozen=True, eq=False, order=False, auto_attribs=True) class VerifyJsonRequest: """ A request to verify a JSON object. diff --git a/synapse/events/builder.py b/synapse/events/builder.py index 10ef01131b4..492c8c3d71c 100644 --- a/synapse/events/builder.py +++ b/synapse/events/builder.py @@ -48,7 +48,7 @@ logger = logging.getLogger(__name__) -@attr.s(slots=True, cmp=False, frozen=True, auto_attribs=True) +@attr.s(slots=True,eq=False, order=False, frozen=True, auto_attribs=True) class EventBuilder: """A format independent event builder used to build up the event content before signing the event. diff --git a/tests/server.py b/tests/server.py index 95aff6f66c4..a3007ced281 100644 --- a/tests/server.py +++ b/tests/server.py @@ -781,7 +781,7 @@ def get_clock() -> Tuple[ThreadedMemoryReactorClock, Clock]: @implementer(ITransport) -@attr.s(cmp=False, auto_attribs=True) +@attr.s(eq=False, order=False, auto_attribs=True) class FakeTransport: """ A twisted.internet.interfaces.ITransport implementation which sends all its data