Replace deprecated attrs cmp=False parameter with eq=False (#384)

See https://attrs.readthedocs.io/en/stable/api.html#core
This commit is contained in:
sneakypete81 2020-04-12 22:50:03 +01:00 committed by GitHub
parent d4a2c70d52
commit aa555a82ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ setup(name="magic-wormhole",
install_requires=[ install_requires=[
"spake2==0.8", "pynacl", "spake2==0.8", "pynacl",
"six", "six",
"attrs >= 16.3.0", # 16.3.0 adds __attrs_post_init__ "attrs >= 19.2.0", # 19.2.0 replaces cmp parameter with eq/order
"twisted[tls] >= 17.5.0", # 17.5.0 adds failAfterFailures= "twisted[tls] >= 17.5.0", # 17.5.0 adds failAfterFailures=
"autobahn[twisted] >= 0.14.1", "autobahn[twisted] >= 0.14.1",
"automat", "automat",

View File

@ -459,7 +459,7 @@ class _Record(object):
self._framer.send_frame(frame) self._framer.send_frame(frame)
@attrs(cmp=False) @attrs(eq=False)
class DilatedConnectionProtocol(Protocol, object): class DilatedConnectionProtocol(Protocol, object):
"""I manage an L2 connection. """I manage an L2 connection.

View File

@ -43,7 +43,7 @@ NOISEPROTO = b"Noise_NNpsk0_25519_ChaChaPoly_BLAKE2s"
def build_noise(): def build_noise():
return NoiseConnection.from_name(NOISEPROTO) return NoiseConnection.from_name(NOISEPROTO)
@attrs(cmp=False) @attrs(eq=False)
@implementer(IDilationConnector) @implementer(IDilationConnector)
class Connector(object): class Connector(object):
"""I manage a single generation of connection. """I manage a single generation of connection.

View File

@ -104,7 +104,7 @@ def make_side():
# * if follower calls w.dilate() but not leader, follower waits forever # * if follower calls w.dilate() but not leader, follower waits forever
# in "want", leader waits forever in "wanted" # in "want", leader waits forever in "wanted"
@attrs(cmp=False) @attrs(eq=False)
@implementer(IDilationManager) @implementer(IDilationManager)
class Manager(object): class Manager(object):
_S = attrib(validator=provides(ISend), repr=False) _S = attrib(validator=provides(ISend), repr=False)

View File

@ -340,7 +340,7 @@ class Outbound(object):
# modelled after twisted.internet._producer_helper._PullToPush , but with a # modelled after twisted.internet._producer_helper._PullToPush , but with a
# configurable Cooperator, a pause-immediately argument to startStreaming() # configurable Cooperator, a pause-immediately argument to startStreaming()
@implementer(IPushProducer) @implementer(IPushProducer)
@attrs(cmp=False) @attrs(eq=False)
class PullToPush(object): class PullToPush(object):
_producer = attrib(validator=provides(IPullProducer)) _producer = attrib(validator=provides(IPullProducer))
_unregister = attrib(validator=lambda _a, _b, v: callable(v)) _unregister = attrib(validator=lambda _a, _b, v: callable(v))

View File

@ -73,7 +73,7 @@ class _SubchannelAddress(object):
_scid = attrib(validator=instance_of(six.integer_types)) _scid = attrib(validator=instance_of(six.integer_types))
@attrs(cmp=False) @attrs(eq=False)
@implementer(ITransport) @implementer(ITransport)
@implementer(IProducer) @implementer(IProducer)
@implementer(IConsumer) @implementer(IConsumer)