You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The generated code uses fromisoformat to convert a datetime. Unfortunately, fromisoformat was introduced in Python 3.7 and therefore is not available on Python 3.6 (see #137).
To Reproduce
Generate a client from a spec containing a schema with a property such as:
When using the client, you'll get the following error:
/path/to/client/models/schema.py in from_dict(d), line 47:
last_modification_date = datetime.fromisoformat(cast(str, d.get("lastModificationDate")))
AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'
Expected behavior
No exception. This is just something to adapt for Python 3.6 support 🙂
Desktop (please complete the following information):
OS: RedHat 7
Python Version: 3.6.8
openapi-python-client version 0.5.2
The text was updated successfully, but these errors were encountered:
Describe the bug
The generated code uses fromisoformat to convert a datetime. Unfortunately,
fromisoformat
was introduced in Python 3.7 and therefore is not available on Python 3.6 (see #137).To Reproduce
Generate a client from a spec containing a schema with a property such as:
When using the client, you'll get the following error:
Expected behavior
No exception. This is just something to adapt for Python 3.6 support 🙂
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: