From def6050040232c00ccaf3b128c965c3e674d49c3 Mon Sep 17 00:00:00 2001 From: Daniel Sotirhos Date: Mon, 12 Feb 2024 18:27:08 -0800 Subject: [PATCH] Ignore DeprecationWarning from datetime, add FIXME (#5953) --- scripts/sell_unused_slots.py | 2 ++ src/azul/dss.py | 2 ++ test/azul_test_case.py | 5 +++++ test/service/test_manifest.py | 2 ++ 4 files changed, 11 insertions(+) diff --git a/scripts/sell_unused_slots.py b/scripts/sell_unused_slots.py index 5cd68f2849..e583ed398f 100644 --- a/scripts/sell_unused_slots.py +++ b/scripts/sell_unused_slots.py @@ -76,6 +76,8 @@ def _list_contribution_lambda_functions(cls) -> list[Lambda]: ] def _lambda_invocation_counts(self) -> dict[Lambda, int]: + # FIXME: DeprecationWarning for datetime methods in Python 3.12 + # https://github.com/DataBiosphere/azul/issues/5953 end = datetime.utcnow() start = end - timedelta(minutes=self.interval) lambdas_by_name = { diff --git a/src/azul/dss.py b/src/azul/dss.py index 08b67f3fde..bf1ca6baf5 100644 --- a/src/azul/dss.py +++ b/src/azul/dss.py @@ -9,6 +9,8 @@ def new_version(): + # FIXME: DeprecationWarning for datetime methods in Python 3.12 + # https://github.com/DataBiosphere/azul/issues/5953 return datetime.utcnow().strftime(version_format) diff --git a/test/azul_test_case.py b/test/azul_test_case.py index 3818e58e1b..4500725975 100644 --- a/test/azul_test_case.py +++ b/test/azul_test_case.py @@ -147,6 +147,11 @@ class RE(str): 'The \'body\' parameter is deprecated for the \'.*\' API ' 'and will be removed in .*. Instead use .*' ), + + # FIXME: DeprecationWarning for datetime methods in Python 3.12 + # https://github.com/DataBiosphere/azul/issues/5953 + 'datetime.datetime.utcnow() is deprecated', + 'datetime.datetime.utcfromtimestamp() is deprecated' }, UserWarning: { 'https://github.com/DataBiosphere/azul/issues/2114', diff --git a/test/service/test_manifest.py b/test/service/test_manifest.py index f57b88d012..542aebda06 100644 --- a/test/service/test_manifest.py +++ b/test/service/test_manifest.py @@ -1132,6 +1132,8 @@ def test_bdbag_manifest_remove_redundant_entries(self): Test BDBagManifestGenerator._remove_redundant_entries() directly with a large set of sample data """ + # FIXME: DeprecationWarning for datetime methods in Python 3.12 + # https://github.com/DataBiosphere/azul/issues/5953 now = datetime.utcnow() def v(i):