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. |