]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-115225: Raise error on unsupported ISO 8601 time strings (#119339)
authorbenchatt <benchatt@users.noreply.github.com>
Wed, 5 Jun 2024 17:35:40 +0000 (10:35 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Jun 2024 17:35:40 +0000 (13:35 -0400)
commit14e3c7071bd1add30d4b69b62e011c7d38aebd9b
treef0c987ef0c34f30bba9200dfecf154ade5ae0e1c
parent10eac0269bce4e2ba575e5b549d3dd9a6da9349a
gh-115225: Raise error on unsupported ISO 8601 time strings (#119339)

Some time strings that contain fractional hours or minutes are permitted
by ISO 8601, but such strings are very unlikely to be intentional. The
current parser does not parse such strings correctly or raise an error.
This change raises a ValueError when hours or minutes contain a decimal mark.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Lib/test/datetimetester.py
Misc/ACKS
Misc/NEWS.d/next/Library/2024-05-21-19-10-30.gh-issue-115225.eRmfJH.rst [new file with mode: 0644]
Modules/_datetimemodule.c