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 5 commits into from Aug 31, 2022


Copy link

@Czaki Czaki commented Aug 31, 2022

Change Summary

Add __hash__ method to pydantic.color.Color class.

Related issue number

fix #4454


  • 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/ 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

Copy link
Contributor Author

Czaki commented Aug 31, 2022

please review

changes/ Outdated Show resolved Hide resolved
Copy link

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

I left a small suggestion.
Other than that LGTM

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

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
None yet

Successfully merging this pull request may close these issues.

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