[3.13] gh-130959: Reject whitespace in fractions, in pure Python `fromisoformat()` (#130962) (#131076)
gh-130959: Reject whitespace in fractions, in pure Python `fromisoformat()` (#130962) Fix the pure Python implementation of `fromisoformat()` to reject any non-digit characters, including whitespace, in the fractional part of time specification. This makes the behavior consistent with the C implementation, and prevents incorrect parsing of these fractions (e.g. `.400 ` would be misinterpreted as `.04`). Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com> (cherry picked from commit 33494b4d0dafc34ff4f1c118b7b3b5d8de3dd0f4) Co-authored-by: Michał Górny <mgorny@gentoo.org>
V
Victor Stinner committed
27fd328cf68e5d812cdb7f9533a16dd68d911c54
Parent: 68a1591
Committed by GitHub <noreply@github.com>
on 3/11/2025, 11:39:27 AM