This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author p-ganssle
Recipients Bengt.Lüers, belopolsky, p-ganssle
Date 2020-11-16.17:16:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605546984.73.0.853871707846.issue42371@roundup.psfhosted.org>
In-reply-to
Content
This is the expected behavior of `.fromisoformat()`. A similar issue is https://bugs.python.org/issue35829, which asks for the "Z" suffix to be supported.

There is a note about this in the documentation: https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat

"Caution This does not support parsing arbitrary ISO 8601 strings - it is only intended as the inverse operation of datetime.isoformat(). A more full-featured ISO 8601 parser, dateutil.parser.isoparse is available in the third-party package dateutil."

At some point we will work out the kinks in offering as full an ISO 8601 datetime parser as possible, but the ISO 8601 datetime spec is very complicated and includes many optional features. We deliberately chose to keep the scope of `.fromisoformat()` minimal at first, whereas `dateutil.parser.isoparse` attempts to be a full-featured ISO8601 parser.

Changing the version affected to 3.10, since this is a feature request.
History
Date User Action Args
2020-11-16 17:16:24p-gansslesetrecipients: + p-ganssle, belopolsky, Bengt.Lüers
2020-11-16 17:16:24p-gansslesetmessageid: <1605546984.73.0.853871707846.issue42371@roundup.psfhosted.org>
2020-11-16 17:16:24p-gansslelinkissue42371 messages
2020-11-16 17:16:24p-gansslecreate