Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix remaining uses of deprecated cmp argument in attrs decorators #9641

Open
ulope opened this issue Mar 17, 2021 · 4 comments
Open

Fix remaining uses of deprecated cmp argument in attrs decorators #9641

ulope opened this issue Mar 17, 2021 · 4 comments
Labels
good first issue Good for newcomers O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@ulope
Copy link

ulope commented Mar 17, 2021

Description

There are a handful of places left that use the deprecated cmp argument on the attr.s decorator:

These should be fixed.

@clokep
Copy link
Member

clokep commented Mar 17, 2021

Any idea what they should be replaced? Would you be willing to make a PR making this change?

@clokep clokep added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Mar 17, 2021
ulope added a commit to ulope/raiden that referenced this issue Mar 18, 2021
We had accrued a big bunch of deprecation warnings (which usually
showed up when running the tests) which would cause breakage in future
Python versions.

This upgrades packages as necessary and fixes most warnings.
The remaining ones are being tracked here:

- raiden-network/raiden-api-client#1
- matrix-org/synapse#9641
- matrix-org/synapse#9642

This also temporarily removes the docs requirements from the dev set
since there's a conflict between `releases` and `py-solc-x` pinned
versions of `semantic-version`. See: bitprophet/releases#94
ulope added a commit to ulope/raiden that referenced this issue Mar 18, 2021
We had accrued a big bunch of deprecation warnings (which usually
showed up when running the tests) which would cause breakage in future
Python versions.

This upgrades packages as necessary and fixes most warnings.
The remaining ones are being tracked here:

- raiden-network/raiden-api-client#1
- matrix-org/synapse#9641
- matrix-org/synapse#9642

This also temporarily removes the docs requirements from the dev set
since there's a conflict between `releases` and `py-solc-x` pinned
versions of `semantic-version`. See: bitprophet/releases#94
ulope added a commit to ulope/raiden that referenced this issue Mar 18, 2021
We had accrued a big bunch of deprecation warnings (which usually
showed up when running the tests) which would cause breakage in future
Python versions.

This upgrades packages as necessary and fixes most warnings.
The remaining ones are being tracked here:

- raiden-network/raiden-api-client#1
- matrix-org/synapse#9641
- matrix-org/synapse#9642
- slezica/python-frozendict#25

This also temporarily removes the docs requirements from the dev set
since there's a conflict between `releases` and `py-solc-x` pinned
versions of `semantic-version`. See: bitprophet/releases#94
@clokep clokep added the good first issue Good for newcomers label Mar 18, 2021
ulope added a commit to ulope/raiden that referenced this issue Mar 23, 2021
We had accrued a big bunch of deprecation warnings (which usually
showed up when running the tests) which would cause breakage in future
Python versions.

This upgrades packages as necessary and fixes most warnings.
The remaining ones are being tracked here:

- raiden-network/raiden-api-client#1
- matrix-org/synapse#9641
- matrix-org/synapse#9642
- slezica/python-frozendict#25

This also temporarily removes the docs requirements from the dev set
since there's a conflict between `releases` and `py-solc-x` pinned
versions of `semantic-version`. See: bitprophet/releases#94
ulope added a commit to raiden-network/raiden that referenced this issue Mar 23, 2021
We had accrued a big bunch of deprecation warnings (which usually
showed up when running the tests) which would cause breakage in future
Python versions.

This upgrades packages as necessary and fixes most warnings.
The remaining ones are being tracked here:

- raiden-network/raiden-api-client#1
- matrix-org/synapse#9641
- matrix-org/synapse#9642
- slezica/python-frozendict#25

This also temporarily removes the docs requirements from the dev set
since there's a conflict between `releases` and `py-solc-x` pinned
versions of `semantic-version`. See: bitprophet/releases#94
karlb pushed a commit to raiden-network/raiden that referenced this issue Apr 23, 2021
We had accrued a big bunch of deprecation warnings (which usually
showed up when running the tests) which would cause breakage in future
Python versions.

This upgrades packages as necessary and fixes most warnings.
The remaining ones are being tracked here:

- raiden-network/raiden-api-client#1
- matrix-org/synapse#9641
- matrix-org/synapse#9642
- slezica/python-frozendict#25

This also temporarily removes the docs requirements from the dev set
since there's a conflict between `releases` and `py-solc-x` pinned
versions of `semantic-version`. See: bitprophet/releases#94
ulope added a commit to ulope/synapse that referenced this issue Apr 27, 2021
The `cmp` argument to the `attr.s` decorator [is deprecated](https://www.attrs.org/en/stable/api.html#attr.s).
This replaces it with `eq` and `order` as suggested in the attrs docs.

Fixes: matrix-org#9641
@lakshay1121
Copy link

Is this issue still open ?

@clokep
Copy link
Member

clokep commented Jan 25, 2023

Is this issue still open ?

It looks like some of the instances have been replaced, but not all. I still see:

synapse/crypto/keyring.py:@attr.s(slots=True, frozen=True, cmp=False, auto_attribs=True)
synapse/events/builder.py:@attr.s(slots=True, cmp=False, frozen=True, auto_attribs=True)

#9892 was a start on this, but was missing bumping the minimum version of attrs.

@clokep clokep added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Jan 25, 2023
@lakshay1121
Copy link

okk fine then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants