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 33494b4d0d)
(cherry picked from commit 27fd328cf6)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Michał Górny <mgorny@gentoo.org>
This makes the pure Python implementation consistent with the C implementation.
(cherry picked from commit 34f5ae69fe)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Docs: Fix typo in datetime.tzinfo docstring (GH-107257)
(cherry picked from commit 60a9eea3f5)
Co-authored-by: Mikhail Samylov <Samylov-Mikhail@yandex.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-106392: Fix inconsistency in deprecation warnings (GH-106436)
They used "datetime" to refer to both the object and the module.
(cherry picked from commit d5c5d4bfd3)
Co-authored-by: William Andrea <william.j.andrea@gmail.com>
This breaks the tests, but we are keeping it as a separate commit so
that the move operation and editing of the moved files are separate, for
a cleaner history.