Remove frozenset() call from dataclass augmentation code - #567
Merged
Conversation
inducer
commented
Dec 10, 2024
| except AttributeError: | ||
| pass | ||
|
|
||
| h = hash(frozenset({attr_tuple_hash})) |
Owner
Author
There was a problem hiding this comment.
@matthiasdiener It looks like this was there from the beginning, but I can't figure out why. Any thoughts?
It blew up with the release of numpy 2.2, failling like this: https://github.com/inducer/pytools/actions/runs/12245644757/job/34159956196.
Contributor
There was a problem hiding this comment.
Huh, this is very strange. This part of the code in #521 was inspired by inducer/pymbolic#125, which does not have a frozenset() call. Not sure at the moment why I added it.
Contributor
There was a problem hiding this comment.
I suspect calling frozenset() here is wrong in any case, since not everything might be hashable?
Owner
Author
There was a problem hiding this comment.
I agree, it should not be here.
inducer
force-pushed
the
no-frozenset-in-hash
branch
from
December 10, 2024 03:58
87a2ca8 to
cef8b50
Compare
inducer
force-pushed
the
no-frozenset-in-hash
branch
from
December 10, 2024 04:09
cef8b50 to
42c5be3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.