-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[#9791] Fix datetime.datetime.utcnow() is deprecated as of Python 3.12 #9839
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9839 +/- ##
==========================================
- Coverage 88.12% 88.05% -0.08%
==========================================
Files 178 178
Lines 22458 22458
==========================================
- Hits 19792 19775 -17
- Misses 2666 2683 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Judging by what is noted in the README, about changing code of Changes made to Just for the record, the returned type of |
I will try to submit an additional commit this week, to raise the patch coverage, specifically for |
@slothkong Since I'm not aware of any breaking changes, I've added the But to cover our bases, I've added this checklist item for the code review: |
Is that a blocker for merging this PR? |
Resolves #9791
Problem
Any usage of
datetime.datetime.utcnow()
throws a deprecation warning in Python 3.12 when unittests are executed.Solution
To get some results firsts, I just want to help with:
datetime.utcnow()
->datetime.now(timezone.utc).replace(tzinfo=None)
Code review checklist
artifact_minor_upgrade
label. See #9839 (comment) for context.Checklist
Additional Context
Python 3.12.0
,Ubuntu 22.04
dbt-postgres
anddbt-bigguery
(1.8.0b1), then browsed over the resultingmanifest.json
files and verified that time references were accurate.dbt-common
andlogbook
dependencies: