Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise DeprecationWarning when comparing subclasses #394

Merged
merged 3 commits into from
Jun 16, 2018

Conversation

hynek
Copy link
Member

@hynek hynek commented Jun 16, 2018

Fixes #387

The docs were always clear on this:

But the attributes are only compared, if the type of both classes is identical!

(which sounds weird, so I fix it in this PR too)

@codecov
Copy link

codecov bot commented Jun 16, 2018

Codecov Report

Merging #394 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #394   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         835    844    +9     
  Branches      174    178    +4     
=====================================
+ Hits          835    844    +9
Impacted Files Coverage Δ
src/attr/_make.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c41470...edacf35. Read the comment docs.

Copy link

@wsanchez wsanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hynek hynek merged commit 2834ee4 into master Jun 16, 2018
@hynek hynek deleted the deprecate-subclass-cmp branch June 16, 2018 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

attrs._make should document why it is more restrictive with __eq__ than other comparisons
2 participants