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

Avoid use of datetime.utc* deprecated in Python 3.12 #24

Merged
merged 4 commits into from
Jun 10, 2023
Merged

Avoid use of datetime.utc* deprecated in Python 3.12 #24

merged 4 commits into from
Jun 10, 2023

Conversation

tempora/timing.py Outdated Show resolved Hide resolved
Copy link
Owner

@jaraco jaraco left a comment

Choose a reason for hiding this comment

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

Thanks for bringing these concerns to my attention. I have a couple of concerns, but overall, this is looking good.

tempora/timing.py Outdated Show resolved Hide resolved
tests/test_schedule.py Outdated Show resolved Hide resolved
@scop
Copy link
Contributor Author

scop commented Jun 7, 2023

TBH, I suppose DST changes don't actually play much of a role in this assuming a correctly set up system. But the monotonic time value exists specifically for cases like this one, https://peps.python.org/pep-0418/ mentions manual and NTP adjustments.

Switching to monotonic would imply some internal changes how elapsed is constructed, but I recognized that needs to stay a timedelta and it sure can. I just didn't want to start modifying too much; I'm not actually even using tempora (directly/that I know of), but just sent a few related PR's to projects in Home Assistant's dependency chain.

@jaraco
Copy link
Owner

jaraco commented Jun 10, 2023

This is great. Before the changes, there are 259 warnings. After the change, 252 warnings (and none in tempora).

@jaraco jaraco merged commit 3c84aa1 into jaraco:main Jun 10, 2023
7 checks passed
@jaraco
Copy link
Owner

jaraco commented Jun 10, 2023

Releasing as v5.3.0.

@scop scop deleted the py312-naive-utc branch June 10, 2023 20:12
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.

None yet

2 participants