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

chore: Replace datetime.utcnow() #19435

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Conversation

webjunkie
Copy link
Contributor

@webjunkie webjunkie commented Dec 20, 2023

Problem

datetime.utcnow() is going to be deprecated.

See https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow

Also, in another branch I upgrade Pydantic and it will have aware datetimes as default, so we need to move some to aware anyways for things to work cleaner.

Changes

  • update to datetime.now(timezone.utc)

How did you test this code?

  • tests

@webjunkie webjunkie marked this pull request as ready for review December 20, 2023 10:09
@webjunkie
Copy link
Contributor Author

Hi @tomasfarias, some of these lines are in code that you know about. Can you take a look if these changes are safe? Thanks!

Copy link
Contributor

@tomasfarias tomasfarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the batch-exports side, everything looks good! Double checked if tests are passing and it's a yes from me. Had this as a todo for a while, thank you!

@webjunkie webjunkie merged commit 3c7575b into master Dec 20, 2023
75 checks passed
@webjunkie webjunkie deleted the chore/replace-datetime-utcnow branch December 20, 2023 12:17
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