KeyBuilder: add datetime hashing#219
Merged
inducer merged 5 commits intoinducer:mainfrom Apr 24, 2024
Merged
Conversation
17cd6c1 to
eecf528
Compare
inducer
reviewed
Apr 16, 2024
| update_for_Map = update_for_frozendict # noqa: N815 | ||
|
|
||
| def update_for_datetime(self, key_hash: Hash, key: Any) -> None: | ||
| self.rec(key_hash, key.isoformat(timespec="microseconds")) |
Owner
There was a problem hiding this comment.
I don't think this is correct. Two datetimes from different timezones can compare equal. Look at what datetime.__eq__ does? Maybe use timestamp? (And please add a test for the timezone thing.)
Owner
|
Could you look at the failures here? (Or move this to draft status if it's not ready?) |
496f5d8 to
a59e717
Compare
Contributor
Author
|
Thanks @inducer , I think this is ready for another look |
Owner
|
Thx! |
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.