]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-127260: Improve error consistency in both `fromisoformat` implementations (#130134)
authordonBarbos <donbarbos@proton.me>
Tue, 18 Feb 2025 15:49:28 +0000 (19:49 +0400)
committerGitHub <noreply@github.com>
Tue, 18 Feb 2025 15:49:28 +0000 (15:49 +0000)
commit427dd10250f94d79bad7927d6ea231950c395bd6
treeeba12077a35fd6c95e991f5513d298fc20c18ef2
parent46ac85e4d9fcffe1a8f921989414a89648b5501a
gh-127260: Improve error consistency in both `fromisoformat` implementations (#130134)

In the Python implementation, "Z" was allowed where only "+" or "-" should be allowed in time zone specifiers. In the C implementation, ":" was allowed as a separator between the whole and fractional portion of times (seconds). These have both been forbidden and the error messages harmonized.
Lib/_pydatetime.py
Lib/test/datetimetester.py
Misc/NEWS.d/next/Library/2025-02-14-23-38-03.gh-issue-127260.dXQ8P0.rst [new file with mode: 0644]
Modules/_datetimemodule.c