Skip to content
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

Update python_interpreter to 3.11 #207

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

austlane
Copy link
Contributor

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

Upgrades AWX-EE from Python 3.9 to Python 3.11. Bringing with it 3.11's speed improvements.

Also replaces `python-unversioned-command` with `alternatives` command -- as `python-unversioned-command` always links to python3.9
@austlane
Copy link
Contributor Author

austlane commented Jun 12, 2023

The roadmap for Ansible 2.16 seems to indicate this interpreter upgrade will be necessary soon.
See:

https://docs.ansible.com/ansible/devel//roadmap/ROADMAP_2_16.html#planned-work

- Drop Python 3.9 support for controller

@oyvindkolbu
Copy link

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.

@But4ler
Copy link

But4ler commented Dec 11, 2023

Any update ?
We have a different problem with python 3.9, ansible 8.7.0 and above all ansible-core 2.15.7

@Julien5858
Copy link

Any update about this one?

@TheRealHaoLiu
Copy link
Member

close and re-open to trigger CI

@jessicamack
Copy link
Member

Hello @austlane, thank you for your contribution. I've confirmed the test case and will be merging.

@jessicamack jessicamack merged commit ed26cac into ansible:devel Aug 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants