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

jsondiff: fix symbol equality #61

Merged

Conversation

corytodd
Copy link
Collaborator

@corytodd corytodd commented Jun 2, 2023

In #55 an equality method was introduced without a corresponding hash
method. Hashable objects that implement __eq__ must also implement
__hash__ if the type is immutable [1]. Implement hash using the label
field which is now a property in order to convey the intent of
immutability.

Fixes #58

[1] https://docs.python.org/3/reference/datamodel.html#object.__hash__

Signed-off-by: Cory Todd cory.todd@canonical.com

Cory Todd added 2 commits June 2, 2023 15:18
The hypothesis artifacts would never need to be committed.

Signed-off-by: Cory Todd <cory.todd@canonical.com>
In xlwings#55 an equality method was introduced without a corresponding hash
method. Hashable objects that implement __eq__ must also implement
__hash__ if the type is immutable [1]. Implement hash using the label
field which is now a property in order to convey the intent of
immutability.

Fixes xlwings#58

[1] https://docs.python.org/3/reference/datamodel.html#object.__hash__

Signed-off-by: Cory Todd <cory.todd@canonical.com>
@corytodd corytodd mentioned this pull request Jun 2, 2023
@fzumstein fzumstein merged commit 464f408 into xlwings:master Jun 3, 2023
@fzumstein
Copy link
Member

thanks!

@corytodd corytodd deleted the corytodd/fix-symbol-equality-impl branch June 3, 2023 14:54
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.

Are the tests working?
2 participants