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 as of Python 3.12 #99

Closed
dataders opened this issue Mar 21, 2024 · 3 comments
Closed

datetime.datetime.utcnow() is deprecated as of Python 3.12 #99

dataders opened this issue Mar 21, 2024 · 3 comments
Labels

Comments

@dataders
Copy link

The below line throws the following deprecation warning in Python 3.12. There may be more references here. There are more in dbt-core itself I think

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).

ts = datetime.utcnow()

@slothkong
Copy link

Hello @dataders ,

Just for the sake of completeness, there might be one additional line in need of patching:

ts: str = datetime.utcnow().strftime("%H:%M:%S")

Copy link

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 27, 2024
Copy link

github-actions bot commented Oct 4, 2024

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants