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

Update all instances of utcnow() #271

Closed
cnfait opened this issue Feb 12, 2024 · 0 comments
Closed

Update all instances of utcnow() #271

cnfait opened this issue Feb 12, 2024 · 0 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@cnfait
Copy link
Contributor

cnfait commented Feb 12, 2024

utcnow() is deprecated since Python 3.12: https://blog.miguelgrinberg.com/post/it-s-time-for-a-change-datetime-utcnow-is-now-deprecated

Since we're planning to upgrade everything to use this version (see #268), let's avoid using this method, as at the very least warnings could clutter logs.

@cnfait cnfait added the good first issue Good for newcomers label Feb 12, 2024
@cnfait cnfait added this to the 2.2.0 milestone Feb 12, 2024
@cnfait cnfait self-assigned this Feb 12, 2024
@cnfait cnfait removed their assignment Feb 12, 2024
cnfait pushed a commit that referenced this issue Feb 21, 2024
since Python 3.12 utcnow() is deprecated
it is replaced by now() withthe timezone information provided by datetime.timezone.utc
datetime.timezone.utc is unwiedly though and since Python 3.11 the shorter datetime.UTC
is available as an alias. This updates all SDLF with it.
@cnfait cnfait closed this as completed Feb 21, 2024
@github-project-automation github-project-automation bot moved this to ✅ Done in SDLF Roadmap Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

1 participant