Paul Ganssle <p.gans...@gmail.com> added the comment:

This is a duplicate of #35829.

The reason that 'Z' is not supported is that `fromisoformat()` is not a general 
ISO 8601 parser, but rather is intended to be the inverse of `isoformat()`. See 
the documentation here: 
https://docs.python.org/dev/library/datetime.html#datetime.datetime.fromisoformat

The current state of #35829 is that expanding to support all of ISO 8601 is an 
option, but determining the scope an the API are a bit tricky. ISO 8601 is more 
complicated than most people think.

In the meantime, `dateutil.parser.isoparse` is intentionally scoped to parse 
all valid ISO 8601 datetimes.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> datetime: parse "Z" timezone suffix in fromisoformat()
type:  -> enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37962>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to