From ecc84aa448a962f1a224144bbb65f0cef36a4279 Mon Sep 17 00:00:00 2001 From: Rob van der Linde Date: Fri, 2 Feb 2024 12:54:41 +1300 Subject: [PATCH] python: do not make use of typing.Final for python 3.6 Python 3.6 does not have typing.Final yet BUG: https://bugzilla.samba.org/show_bug.cgi?id=15575 Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/nt_time.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/samba/nt_time.py b/python/samba/nt_time.py index 69e01d61196..4518e90b158 100644 --- a/python/samba/nt_time.py +++ b/python/samba/nt_time.py @@ -18,18 +18,18 @@ # import datetime -from typing import Final, NewType +from typing import NewType NtTime = NewType("NtTime", int) NtTimeDelta = NewType("NtTimeDelta", int) -NT_EPOCH: Final = datetime.datetime( +NT_EPOCH = datetime.datetime( 1601, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc ) -NT_TICKS_PER_μSEC: Final = 10 -NT_TICKS_PER_SEC: Final = NT_TICKS_PER_μSEC * 10**6 +NT_TICKS_PER_μSEC = 10 +NT_TICKS_PER_SEC = NT_TICKS_PER_μSEC * 10**6 def _validate_nt_time(nt_time: NtTime) -> None: -- 2.11.4.GIT