Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecationwarning for datetime.utcnow #144

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Matthieu-LAURENT39
Copy link
Contributor

@Matthieu-LAURENT39 Matthieu-LAURENT39 commented Feb 22, 2024

This replaces the call to datetime.utcnow() to datetime.now(timezone.utc).
datetime.utcnow() is deprecated since python 3.12, and as such shows a warning every time save_to_storage() is called.

We use timezone.utc instead of the more recent datetime.utc, since only the former is available in python 3.7

@Matthieu-LAURENT39 Matthieu-LAURENT39 marked this pull request as draft February 22, 2024 11:30
@Matthieu-LAURENT39 Matthieu-LAURENT39 marked this pull request as ready for review February 22, 2024 11:30
@yobuntu
Copy link

yobuntu commented May 3, 2024

should fix : #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants