mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 17:07:33 -02:30
AAP-59874: Update to Python 3.12 (#16208)
* update to Python 3.12 * remove use of utcnow * switch to timezone.utc datetime.UTC is an alias of datetime.timezone.utc. if we're doing the double import for datetime it's more straightforward to just import timezone as well and get it directly * debug python env version issue * change python version * pin to SHA and remove debug portion
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
import sys
|
||||
|
||||
from unittest import mock
|
||||
@@ -379,7 +379,7 @@ class TestUpdatePayload(object):
|
||||
|
||||
|
||||
def test_to_ical():
|
||||
now = datetime.utcnow()
|
||||
now = datetime.now(timezone.utc)
|
||||
ical_datetime = utils.to_ical(now)
|
||||
date = str(now.date()).replace('-', '')
|
||||
time = str(now.time()).split('.')[0].replace(':', '')
|
||||
|
||||
Reference in New Issue
Block a user