Repository navigation
Conversation
Wkhanex
reviewed
Oct 14, 2026
Wkhanex
left a comment
There was a problem hiding this comment.
Time-only calls now return None for multi-observance zones, including a daylight-only pair. The single-observance name/DST behavior remains intact, and dated winter/summer offset controls still select their respective observances.
Checked d0831ddbd0f6 with standalone Python 3.12.14 checks (11 passing assertions). I haven't run the full upstream suite.
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.
Summary of changes
time.dst() and time.tzname() pass None to their timezone. A tzical zone with multiple observances currently attempts to select a component using that value and raises AttributeError. Return None when a date is required to choose the observance, while preserving the existing single-observance results. Add time-object regressions, an author entry, and a news fragment.
Validation: the dst/tzname regressions fail on the original source, while the utcoffset and fixed-observance controls already pass. After the change, 44 tzical tests pass with one platform skip. The complete Windows suite has the same four localized tzres-name failures as the unmodified base (2,002 vs 1,998 passing tests). Darker/isort/Black, whitespace/debug hooks, and sdist/wheel builds passed.
Pull Request Checklist
Reference: https://docs.python.org/3/library/datetime.html#tzinfo-objects