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

fix: do not overwrite declared __hash__ in subclasses of a model #2423

Merged
merged 1 commit into from Feb 27, 2021

Conversation

PrettyWood
Copy link
Member

@PrettyWood PrettyWood commented Feb 27, 2021

Change Summary

Declared __hash__ was overwritten and not passed to child models

Related issue number

closes #2422

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@PrettyWood PrettyWood changed the title fix: do not overwrite __hash__ when explicitly declared fix: do not overwrite declared __hash__ in subclasses of a model Feb 27, 2021
@codecov
Copy link

codecov bot commented Feb 27, 2021

Codecov Report

Merging #2423 (7431944) into master (a8d50ae) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2423   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         5080      5084    +4     
  Branches      1041      1042    +1     
=========================================
+ Hits          5080      5084    +4     
Impacted Files Coverage Δ
pydantic/main.py 100.00% <100.00%> (ø)

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 a8d50ae...7431944. Read the comment docs.

@samuelcolvin samuelcolvin merged commit f9fe4aa into pydantic:master Feb 27, 2021
@samuelcolvin
Copy link
Member

great, thank you. What else needs to be included in v1.8.1?

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.

__hash__() is squashed on subclass
2 participants