From 2e91b924135deee7e287fb20bdd6b158a2914b66 Mon Sep 17 00:00:00 2001 From: Martin Komon Date: Sun, 30 May 2021 23:41:50 +0200 Subject: [PATCH] unix-ffi/datetime: Add tzinfo.__new__ to make the package importable. Add constructor to tzinfo class so that the package can be imported without errors. --- unix-ffi/datetime/datetime.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unix-ffi/datetime/datetime.py b/unix-ffi/datetime/datetime.py index dd50b3cf..f9eeb90f 100644 --- a/unix-ffi/datetime/datetime.py +++ b/unix-ffi/datetime/datetime.py @@ -958,6 +958,10 @@ class tzinfo: __slots__ = () + def __new__(self, *args, **kwargs): + """Constructor.""" + return object.__new__(self) + def tzname(self, dt): "datetime -> string name of time zone." raise NotImplementedError("tzinfo subclass must override tzname()")