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

[Bug] <title>deprecated python lib in dbt-common helpers #238

Open
2 tasks done
harry-lynch-gtg opened this issue Jan 23, 2025 · 1 comment · May be fixed by #242
Open
2 tasks done

[Bug] <title>deprecated python lib in dbt-common helpers #238

harry-lynch-gtg opened this issue Jan 23, 2025 · 1 comment · May be fixed by #242
Labels
bug Something isn't working triage

Comments

@harry-lynch-gtg
Copy link

Is this a new bug in dbt-common?

  • I believe this is a new bug in dbt-common
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version.

Expected Behavior

Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC)

Steps To Reproduce

Update the method to get current timestamp

Relevant log output

Additional Context

No response

@harry-lynch-gtg harry-lynch-gtg added bug Something isn't working triage labels Jan 23, 2025
@cfernhout
Copy link

I can add some relevant log output:

/usr/local/lib/python3.12/site-packages/dbt_common/events/logger.py:159: 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).
20:35:10  Completed successfully
/usr/local/lib/python3.12/site-packages/dbt_common/events/helpers.py:12: 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).
/usr/local/lib/python3.12/site-packages/dbt_common/events/logger.py:159: 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).
20:35:10  
/usr/local/lib/python3.12/site-packages/dbt_common/events/helpers.py:12: 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).
/usr/local/lib/python3.12/site-packages/dbt_common/events/logger.py:159: 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).
20:35:10  Done. PASS=10 WARN=0 ERROR=0 SKIP=0 TOTAL=10
/usr/local/lib/python3.12/site-packages/dbt_common/events/helpers.py:12: 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).
/usr/local/lib/python3.12/site-packages/dbt_common/events/logger.py:159: 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).

Running on Python 3.12 with:

dbt-adapters==1.13.1
dbt-common==1.14.0
dbt-core==1.9.1
dbt-extractor==0.5.1
dbt-postgres==1.9.0
dbt-redshift==1.9.0
dbt-semantic-interfaces==0.7.4
dbt-snowflake==1.8.0b3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants