awx-ee
awx-ee copied to clipboard
Update `python_interpreter` to 3.11
Upgrades AWX-EE from Python 3.9 to Python 3.11. Bringing with it 3.11's speed improvements. https://docs.python.org/3/whatsnew/3.11.html
This also replaces python-unversioned-command
with alternatives
command -- as python-unversioned-command
always links to python3.9
in EL9
Working in my local testing:
% ansible-builder create -v3 --context context --output-filename Dockerfile
% docker buildx build -f context/Dockerfile -t awx-ee:dev-py311 context --platform linux/amd64
% docker run -it --user=root awx-ee:dev-py311 bash
[root@2d078ce66bc3 runner]# ansible --version
ansible [core 2.15.0]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.11.2 (main, Feb 16 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3.11)
jinja version = 3.1.2
libyaml = True
The roadmap for Ansible 2.16 seems to indicate this interpreter upgrade will be necessary soon. See:
- https://github.com/ansible/ansible/pull/80973
- https://github.com/ansible-collections/news-for-maintainers/issues/49
https://docs.ansible.com/ansible/devel//roadmap/ROADMAP_2_16.html#planned-work
- Drop Python 3.9 support for controller
Ansible-core 2.16 is out already, so would be great to get this is merged.
We've been running with the patch from the PR in our custom EEs for a while and it works fine.
The only issue is for localhost tasks we need to specify the correct python interpreter, which was quickly resolved by setting ansible_python_interpreter: /usr/bin/python3.11
in inventory.yml
.
Any update ? We have a different problem with python 3.9, ansible 8.7.0 and above all ansible-core 2.15.7
Any update about this one?
close and re-open to trigger CI
Hello @austlane, thank you for your contribution. I've confirmed the test case and will be merging.