-
Notifications
You must be signed in to change notification settings - Fork 3
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
Replace deprecated utcnow()
calls with now(timezone.utc)
#788
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the deprecation notice in the Python 3 docs:
The changes in this branch are consistent with "the recommended way" shown in the red box on that page.
utcnow()
calls with now(timezone.utc)
(recommended in Python docs)
I confirmed that, even in the Python 3.10 docs, this replacement is "recommended." The reason I checked that version of the Python docs is that that is the Python version that is running in the container image that runs the FastAPI app, according to its Dockerfile. |
utcnow()
calls with now(timezone.utc)
(recommended in Python docs)utcnow()
calls with now(timezone.utc)
I'm comfortable with this branch being merged into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thanks.
…ur with `refscan` (no false positives) (#796) * todo: progress * todo: progress * fix: ThreadPoolExecutor is evil? closes #576 * Drop the old tests2 dir * Update to the newer syntax for getting utcnow() (#788) * Add "Translators" subsystem as option in PR template (#767) * Remove reference to nonexistent `tests2` directory --------- Co-authored-by: shreddd <[email protected]> Co-authored-by: Shreyas Cholia <[email protected]> Co-authored-by: eecavanna <[email protected]>
Fix to address deprecated datetime.utcnow() calls