| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…isoformat()` 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>
|
Thanks! |
Sorry, something went wrong.
Fix pure Python implementation of `fromisoformat()` to reject spaces in fractional part of time specifications. This matches the behavior of the C implementation in CPython, and prevents the method from parsing them incorrectly. This fixes Django's test suite by enabling a fallback to their own (working) parser. Backports: python/cpython#130962
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Sorry, @mgorny and @vstinner, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker 33494b4d0dafc34ff4f1c118b7b3b5d8de3dd0f4 3.13 |
Sorry, something went wrong.
|
Sorry, @mgorny and @vstinner, I could not cleanly backport this to 3.12 due to a conflict. cherry_picker 33494b4d0dafc34ff4f1c118b7b3b5d8de3dd0f4 3.12 |
Sorry, something went wrong.
|
GH-131076 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…isoformat()` (python#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 33494b4)
…misoformat()` (#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 33494b4) Co-authored-by: Michał Górny <mgorny@gentoo.org>
…n `fromisoformat()` (pythonGH-130962) (pythonGH-131076) pythongh-130959: Reject whitespace in fractions, in pure Python `fromisoformat()` (pythonGH-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 33494b4) (cherry picked from commit 27fd328) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Michał Górny <mgorny@gentoo.org>
…mat()` (GH-130962) (GH-131076) (#131086) 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`). (cherry picked from commit 33494b4) (cherry picked from commit 27fd328) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Michał Górny <mgorny@gentoo.org>
| Back | FazBrowse Home | New Git URL |
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).