mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03: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:
@@ -310,12 +310,12 @@ if __name__ == '__main__':
|
||||
if events > 0:
|
||||
for k_id in created_job_ids:
|
||||
generate_events(events, str(k_id), time_delta)
|
||||
print(datetime.datetime.utcnow().isoformat())
|
||||
print(datetime.datetime.now(datetime.UTC).isoformat())
|
||||
conn.close()
|
||||
|
||||
finally:
|
||||
# restore all indexes
|
||||
print(datetime.datetime.utcnow().isoformat())
|
||||
print(datetime.datetime.now(datetime.UTC).isoformat())
|
||||
print('restoring indexes and constraints (this may take awhile)')
|
||||
|
||||
workers = []
|
||||
@@ -343,4 +343,4 @@ if __name__ == '__main__':
|
||||
sql = f'ALTER TABLE main_jobevent ADD CONSTRAINT {conname} {condef}'
|
||||
cleanup(sql)
|
||||
|
||||
print(datetime.datetime.utcnow().isoformat())
|
||||
print(datetime.datetime.now(datetime.UTC).isoformat())
|
||||
|
||||
Reference in New Issue
Block a user