- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33
Open
Description
With the example schema from the tutorial here:
https://jsontypedef.com/docs/python-codegen/
{
  "properties": {
    "id": { "type": "string" },
    "createdAt": { "type": "timestamp" },
    "karma": { "type": "int32" },
    "isAdmin": { "type": "boolean" }
  }
}Python 3.11 is happy:
$ conda activate py311
$ python --version
Python 3.11.8
$ python py/__init__.py 
# (Quiet; prints nothing)
Python 3.12 issues this SyntaxWarning about the regex used for the datetime:
$ conda activate py312
$ python --version
Python 3.12.2
$ python py/__init__.py 
.../py/__init__.py:58: SyntaxWarning: invalid escape sequence '\d'
  datetime_re = '^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(\.\d+)?([zZ]|((\+|-)(\d{2}):(\d{2})))$'
Metadata
Metadata
Assignees
Labels
No labels