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:
@@ -24,9 +24,9 @@ try:
|
||||
from ansible.module_utils.compat.version import LooseVersion as Version
|
||||
except ImportError:
|
||||
try:
|
||||
from distutils.version import LooseVersion as Version
|
||||
from packaging.version import Version
|
||||
except ImportError:
|
||||
raise AssertionError('To use this plugin or module with ansible-core 2.11, you need to use Python < 3.12 with distutils.version present')
|
||||
raise AssertionError('To use this plugin or module you need to use Python >= 3.12')
|
||||
|
||||
try:
|
||||
import yaml
|
||||
|
||||
Reference in New Issue
Block a user