Skip to content

Commit

Permalink
Merge pull request #896 from jorenham/patch-1
Browse files Browse the repository at this point in the history
fix py312 `datetime.utcnow` warning
  • Loading branch information
fizyk authored Feb 19, 2024
2 parents c1abf60 + 52c1210 commit d5e7fc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/896.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the remaining `DepcrecationWarning` for `datetime.datetime.utcnow` on Python 3.12.
2 changes: 1 addition & 1 deletion pytest_postgresql/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def retry(
res = func()
return res
except possible_exception as e:
if time + timeout_diff < datetime.datetime.utcnow():
if time + timeout_diff < get_current_datetime():
raise TimeoutError(f"Failed after {i} attempts") from e
sleep(1)

Expand Down

0 comments on commit d5e7fc0

Please sign in to comment.