python-attrs / python-attrs/attrs

No mention of how to use eq/order in narrative docs

Open
#598 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
Dominant language
Python
Stars
5.8k
Forks
480
Avg merge
2h 15m
Merged PRs (30d)
2

Description

I'm getting a new handy error from mypy:

src/ims/application/_main.py:74:2: error: cmp is deprecated, use eq and order  [misc]

In order to make sure I'm using those correctly, I went to attrs.org and looked for some documentation on these new options, but I see no mention of either of the eq or order options, except for some mentions of eq in the section on hashing.

With a deprecation notice like this, a link to some documentation for how to fix your code would be very helpful.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the narrative documentation on attrs.org and reviewing the existing discussion of eq in the hashing section. Add clear guidance for the eq and order options and explain how they address the mypy deprecation warning, with a link from the relevant documentation. Done means a user can find and understand how to update code using cmp.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.