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

Add __hash__ operator to Color class #4455

Merged
merged 5 commits into from Aug 31, 2022
Merged

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Aug 31, 2022

Change Summary

Add __hash__ method to pydantic.color.Color class.

Related issue number

fix #4454

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.
    You can skip this check if the change does not need a change file.)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@Czaki
Copy link
Contributor Author

Czaki commented Aug 31, 2022

please review

changes/4455-czaki.md Outdated Show resolved Hide resolved
@hramezani
Copy link
Member

Thanks @Czaki for reporting the issue and preparing the fix 👍

I left a small suggestion.
Other than that LGTM

Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
@samuelcolvin samuelcolvin merged commit 3a2e83c into pydantic:main Aug 31, 2022
@samuelcolvin
Copy link
Member

Thanks so much.

I haven't had any other bugs reported on v1.10 yet, so I'll make a patch release for just this.

@Czaki Czaki deleted the fix_hash branch August 31, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pydantic.color.Color is not hashable in 1.10.0 release
4 participants