From fba9d2afb35ea5a37a9e2570003ad0194d575e4f Mon Sep 17 00:00:00 2001 From: Victor San Kho Lin Date: Wed, 16 Oct 2024 20:08:42 +1100 Subject: [PATCH] Fixed datetime utcnow deprecation * Bumped minimum version required to Python3.9 --- libumccr/libdt.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libumccr/libdt.py b/libumccr/libdt.py index a5aff0e..6cf1dc1 100644 --- a/libumccr/libdt.py +++ b/libumccr/libdt.py @@ -2,7 +2,7 @@ def get_utc_now_ts(): - return int(datetime.utcnow().replace(tzinfo=timezone.utc).timestamp()) + return int(datetime.now(timezone.utc).replace(tzinfo=timezone.utc).timestamp()) def parse_last_modified_date(date_raw: str) -> datetime: diff --git a/setup.py b/setup.py index 430d83a..ca6caf5 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], - python_requires=">=3.6", + python_requires=">=3.9", extras_require={ "dev": [ "pipdeptree",