Repository navigation
Fix DM_ISO8601 handling of dates with a zero month or day - #264
Merged
Merged
Conversation
Contributor
|
Thanks, I will merge this. |
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.
What changed
00and day00inIsIso8601Date()before callingdays_per_month().PyDate_FromDate()forNULLin the bare-date fast path before callingHandle().Invalid ISO-8601-shaped dates now follow the existing fallback behavior and remain Python strings.
Why both checks are included
The range check prevents invalid zero fields from entering date construction. The
NULLcheck protects the container path if date construction fails for another reason and matches the defensive check already used by the neighboring datetime/time path.Verification
The patch is based on master commit
39996ba9530acde50cef0b82724860ab51819197and was checked withgit apply --checkagainst the current master tip.The earlier local run recorded the complete upstream suite as
1460 passed, 19 skipped, 2 xfailedon both patched release and assertion-enabled builds; the raw pytest logs were not retained, so the repository CI remains the independent confirmation.