SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 2 Python

[3.12] gh-117534: Add checking for input parameter in iso_to_ymd (GH-117543) (#117689)

gh-117534: Add checking for input parameter in iso_to_ymd (GH-117543)

Moves the validation for invalid years in the C implementation of the `datetime` module into a common location between `fromisoformat` and `fromisocalendar`, which improves the error message and fixes a failed assertion when parsing invalid ISO 8601 years using one of the "ISO weeks" formats.

---------

(cherry picked from commit d5f1139c79525b4e7e4e8ad8c3e5fb831bbc3f28)

Co-authored-by: Vlad4896 <166005126+Vlad4896@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
M
Miss Islington (bot) committed
af034dd150ca788ddae107ae5a1f8357f669de9f
Parent: 2683127
Committed by GitHub <noreply@github.com> on 4/9/2024, 6:17:21 PM