Bug 1900235

Summary: ansible fails to build with Python 3.10: ansible-test units: error: argument --python: invalid choice: '3.10'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: ansibleAssignee: Kevin Fenzi <kevin>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: a.badger, kevin, maxim, mhroncok, pcahyna, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-05 12:42:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1890881    

Description Miro Hrončok 2020-11-21 16:40:57 UTC
ansible fails to build with Python 3.10.0a2:

bin/ansible-test units -v --python 3.10 
usage: ansible-test units [-h] [-e] [-v] [--color [COLOR]] [--debug]
                          [--truncate COLUMNS] [--redact] [--no-redact]
                          [--include TARGET] [--exclude TARGET]
                          [--require TARGET] [--coverage]
                          [--coverage-label COVERAGE_LABEL] [--coverage-check]
                          [--base-branch BASE_BRANCH] [--changed]
                          [--untracked] [--ignore-committed] [--ignore-staged]
                          [--ignore-unstaged] [--requirements]
                          [--python-interpreter PATH] [--local] [--venv]
                          [--tox] [--tox-sitepackages] [--docker [IMAGE]]
                          [--remote PLATFORM] [--remote-stage STAGE]
                          [--remote-provider PROVIDER]
                          [--remote-endpoint ENDPOINT]
                          [--remote-aws-region REGION]
                          [--remote-terminate WHEN] [--python VERSION]
                          [--collect-only] [--num-workers NUM_WORKERS]
                          [--docker-no-pull] [--docker-keep-git]
                          [--docker-seccomp SC]
                          [TARGET ...]
ansible-test units: error: argument --python: invalid choice: '3.10' (choose from '2.6', '2.7', '3.5', '3.6', '3.7', '3.8', '3.9', 'default')


Looks like upstream is hardcoding a list of Python versions :/


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01783117-ansible/

For all our attempts to build ansible with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/ansible/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.


Marking severity as high, because ansible is important.

Comment 1 Tomáš Hrnčiar 2020-12-04 09:59:56 UTC
Upstream has hardcoded Python versions. I have opened PR to add 3.10.

https://github.com/ansible/ansible/pull/72852