Skip to content

Commit

Permalink
Ignore DeprecationWarning from datetime, add FIXME (#5953)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirho-ucsc committed Aug 19, 2024
1 parent 0c891e4 commit ca1c534
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/sell_unused_slots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 2 additions & 0 deletions src/azul/dss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
5 changes: 5 additions & 0 deletions test/azul_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions test/service/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,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):
Expand Down

0 comments on commit ca1c534

Please sign in to comment.