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

datetime.datetime.utcnow() is deprecated from python 3.12 #150

Open
yobuntu opened this issue May 3, 2024 · 0 comments
Open

datetime.datetime.utcnow() is deprecated from python 3.12 #150

yobuntu opened this issue May 3, 2024 · 0 comments

Comments

@yobuntu
Copy link

yobuntu commented May 3, 2024

When using python 3.12 we trigger this warning

sqlalchemy_file/file.py:124: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    self["uploaded_at"] = datetime.utcnow().isoformat()

This seems not to be a big deal, and easy to fix as the replacement code is provided in the warning itself.

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

No branches or pull requests

1 participant