Skip to content

Commit e5af94d

Browse files
committed
unix-ffi/datetime: make the package importable
-add constructor to tzinfo class so that the package can be imported without errors
1 parent 9b5d30c commit e5af94d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unix-ffi/datetime/datetime.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,10 @@ class tzinfo:
958958

959959
__slots__ = ()
960960

961+
def __new__(self, *args, **kwargs):
962+
"""Constructor."""
963+
return object.__new__(self)
964+
961965
def tzname(self, dt):
962966
"datetime -> string name of time zone."
963967
raise NotImplementedError("tzinfo subclass must override tzname()")

0 commit comments

Comments
 (0)