This makes flake8-datetimez happier but has no effect on the result:
DTZ007 The use of `datetime.datetime.strptime()` without %z must be
followed by `.replace(tzinfo=)` or `.astimezone()
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Practically were changing API if we start requiring that
expires is non-naive because this no longer works:
metadata.signed.expires = datetime(3000,1,1)
We can make this work without API breaks though:
* it the input is naive, just use UTC
* if the input is not naive or UTC, raise
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* Most importantly use strftime() to serialize the datetime
* Force the timezone as UTC when deserializing
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Allows to simultanously use those classes in different container /
signature wrapper APIs, e.g. Metadata API and Envelope API (DSSE).
All moved classes are imported into tuf.api.metadata scope for
backwards-compatibility.
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>