Skip to content

update for utcnow deprecation - #418

Merged
dotsdl merged 14 commits into
mainfrom
utcnow_deprecation
Aug 7, 2025
Merged

update for utcnow deprecation#418
dotsdl merged 14 commits into
mainfrom
utcnow_deprecation

Conversation

@atravitz

@atravitz atravitz commented Jun 25, 2025

Copy link
Copy Markdown
Contributor

resolves #404

it looks like datetime.datetime.now(tz=datetime.UTC) adds timezone information that breaks some string conversion on the js side. using datetime.datetime.now(tz=None) resolves that, but I think I'd prefer to find a solution that passes datetime.UTC to be more explicit.

@codecov

codecov Bot commented Jun 26, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.48%. Comparing base (3ef7942) to head (7476197).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
alchemiscale/compute/api.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
- Coverage   80.55%   80.48%   -0.07%     
==========================================
  Files          27       27              
  Lines        3888     3890       +2     
==========================================
- Hits         3132     3131       -1     
- Misses        756      759       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atravitz
atravitz requested a review from dotsdl June 26, 2025 22:13
@dotsdl

dotsdl commented Jul 9, 2025

Copy link
Copy Markdown
Member

Thanks @atravitz! We definitely want to ensure our times are in UTC to avoid local times being reported between services that are geographically separated. Can you set these changes to use datetime.datetime.now(tz=datetime.UTC) and we can then work out how to fix the breakages?

@dotsdl

dotsdl commented Aug 5, 2025

Copy link
Copy Markdown
Member

Hey @atravitz, were you able to loop back onto this one? No rush if not!

@dotsdl dotsdl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work @atravitz and @ianmkenney! This is a very clean solution!

@dotsdl
dotsdl merged commit 9c449f0 into main Aug 7, 2025
4 of 6 checks passed
@dotsdl
dotsdl deleted the utcnow_deprecation branch August 7, 2025 15:16
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.

Deprecated utcnow function in Python>=3.12

3 participants