Repository navigation
[master] Datetime utcnow - #66902
[master] Datetime utcnow#66902
Conversation
twangboy
left a comment
There was a problem hiding this comment.
Looks like you have some pre-commit failures
b2d27e1 to
332538e
Compare
Fixed |
|
Looks like the test failures are related to your changes in |
What test failures? For the current version I don't see any (there are either green, or pending) |
|
The test suite tries 3 times... here is the 2nd run: |
332538e to
5019ab1
Compare
|
Ah, I see, |
|
Now a bunch of errors like this: ... |
|
Maybe we'll need to wait until we get the branch builds green again, and then rebase this one. |
|
This looks to be related to pypa/wheel#662, and I see there is a workaround committed to 3006.x already: ec3178f. When merge to master is done usually? |
4b58aac to
5c132a7
Compare
5c132a7 to
c38e13e
Compare
|
First we'll get things merged to 3007.x... then merge forward from there to master |
c38e13e to
bb29ace
Compare
|
Please rebase and resolve conflicts |
datetime.datetime.utcnow() is deprecated in Python 3.12, and it's recommended to switch to timezone-aware objects, so do this. It also simplifies local time handling, as .astimezone() method can be used instead of calculating timezone_delta manually. Part of saltstack#65604
What does this PR do?
This removes some usage of deprecated datetime.datetime.utcnow() and replaces them with timezone-aware objects, while not changing the actual behavior.
What issues does this PR fix or reference?
Partial fix for #65604
This is complementary to #66042
Previous Behavior
Salt logs warnings like:
New Behavior
No warning.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.
See GitHub's page on GPG signing for more information about signing commits with GPG.