Repository navigation
Conversation
Signed-off-by: Aditya <adityasbakawat@gmail.com>
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.
from_format()crashes withAttributeErrorforDoin locales without custom ordinal suffixes, even when parsing the output offormat(). For example, a GermanYYYY-MM-Dostring cannot round-trip.Use a bare numeric pattern when the locale has no ordinal suffix mapping, and escape existing suffixes as literal text. Also reject localized tokens mapped to
Nonewith the existingValueError("Unsupported token: ...")diagnostic instead of looking up a nonexistent translation.Partially addresses #1074: this fixes
Doand the unsupported-token errors. Adding parsing support forMo,Qo, andDDDoremains separate work.Validation:
62 parametrized regression cases passed (9 locales across 6 days, plus 8 unsupported tokens). Before the fix, 50 failed and 12 passed.
Existing formatting tests: 22 passed.
Ruff 0.14.11 lint and format checks passed for both changed files.
Tests ran on Python 3.14 with
PYTHONPATH=srcandPENDULUM_EXTENSIONS=0. The full suite was not run: Windows Application Control blocks the nativetime-machinedependency used by the time-travel tests.Added tests for changed code.
Updated documentation for changed code (no new supported tokens or public API).