Repository navigation
Conversation
Compare and hash retained TZif bytes for unnamed zones so distinct local timezone files no longer collapse in sets and dictionaries. Preserve named-zone behavior. AI assistance: OpenAI Codex.
FanWu-ai
marked this pull request as ready for review
October 11, 2026 22:22
Merging this PR will not alter performance
|
This branch has not been deployed
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.
Pull Request Check List
Fix
Unnamed TZif-backed timezones all have
key=None, so the current key-only equality makes distinct Paris/UTC/New York files equal and collapses them into one set/dictionary entry. This also affects the existing local-timezone fallback for copied/etc/localtimefiles.Compare and hash the TZif bytes already retained for pickling when the key is absent. Independent loads of identical bytes and pickle round trips remain equal. Named/keyed timezone behavior and FixedTimezone are unchanged.
Twelve new cases cover distinct and identical files, collections, all pickle protocols, named/keyed/uncached controls, unrelated objects and copied-localtime discovery. Documentation explains the rule.
Validation
Linux/Python 3.12.14, unchanged dependencies and pinned hooks:
Existing Windows/timezone skips, INFO-level docs anchor notices and Cargo metadata warning are unchanged. Other Python/OS combinations and hosted CI are not claimed passed. Prepared and tested with AI assistance (OpenAI Codex); no human review is claimed.