-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use timezone.utc instead of datetime.UTC for backwards compatibility #303
Conversation
Hi @rcritten The patch is missing an update for
|
Can't believe I missed those. Fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rcritten
thanks for the update, works for me. Tested on RHEL 9.3 with python3-3.9.18-1.el9_3.x86_64:
# pytest tests/test_ipa_certfile_expiration.py
======================================================================================= test session starts ========================================================================================
platform linux -- Python 3.9.18, pytest-7.4.2, pluggy-1.3.0
rootdir: /root/freeipa-healthcheck
collected 3 items
tests/test_ipa_certfile_expiration.py ... [100%]
======================================================================================== 3 passed in 0.43s =========================================================================================
The CI issue (container(38)
) should be fixed with PR #306.
We switched to datetime.UTC because datetime.utcnow() was deprecated. This is only available in python 3.11+. Use datetime.timezone.utc instead which is available from python 3.2+ Fixes: freeipa#302 Signed-off-by: Rob Crittenden <[email protected]>
We switched to datetime.UTC because datetime.utcnow() was deprecated. This is only available in python 3.11+. Use datetime.timezone.utc instead which is available from python 3.2+
Fixes: #302