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” on Python 3.12 #1374

Closed
adamchainz opened this issue Dec 6, 2023 · 2 comments
Closed

“datetime.datetime.utcnow() is deprecated” on Python 3.12 #1374

adamchainz opened this issue Dec 6, 2023 · 2 comments

Comments

@adamchainz
Copy link

I’m seeing this deprecation warning in my test suite with Python 3.12:

/.../minio/time.py:105: 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).
  return datetime.utcnow().replace(tzinfo=timezone.utc)

Deprecation release notes

@adamchainz
Copy link
Author

Looks like this has been handled in 5ca6653, awaiting release.

@balamurugana
Copy link
Member

Fixed by #1338

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

2 participants