added 8 commits
December 4, 2022 13:34Adds a new `tz` constraint for specifying whether the value: - must be timezone aware (`tz=True`) - must be timezone naive (`tz=False`) - may be either timezone aware or timezone naive (`tz=None`, the default).
- By default `datetime.datetime` types will decode both naive and aware datetimes. The presence/absence of a timezone can be enforced by specifying `tz=True`/`tz=False` to a `msgspec.Meta` annotation. - The msgpack decoder now decodes datetimes from strings as well as the timestamp extension. The encoder will always use the timestamp extension when possible, only falling back to encoding to strings when encoding a naive datetime.