podman-compose should throw a readable error on too old python
jsayer101 opened this issue · comments
Describe the bug
Same issue as closed #862. We try to run podman-compose with Python 3.6.8
Traceback (most recent call last):
File "/usr/local/bin/podman-compose", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/podman_compose.py", line 3504, in main
asyncio.run(async_main())
AttributeError: module 'asyncio' has no attribute 'run'
To Reproduce
On RHEL8X / Python 3.6.8
$ sudo -H pip3 install --upgrade pip
$ sudo pip3 install podman-compose
$ podman-compose --version
Expected behavior
Works...
Actual behavior
Got an error
Output
$ podman-compose version
Traceback (most recent call last):
File "/usr/local/bin/podman-compose", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/podman_compose.py", line 3504, in main
asyncio.run(async_main())
AttributeError: module 'asyncio' has no attribute 'run'
$ podman-compose up
Traceback (most recent call last):
File "/usr/local/bin/podman-compose", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/podman_compose.py", line 3504, in main
asyncio.run(async_main())
AttributeError: module 'asyncio' has no attribute 'run'
Environment:
- OS: RHEL 8X
- podman version: 4.9.4-rhel
- podman compose version:
$ pip show podman-compose
Name: podman-compose
Version: 1.2.0
Summary: A script to run docker-compose.yml using podman
More infos
We have RHEL8X systems that works well with Python 3.6.8 and
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.6.1
podman-compose version 1.0.6
podman --version
podman version 4.6.1
exit code: 0
Tested with latest devel, same result.
Actual workaround... Use v1.0.6. (Works well)
pip3 install https://github.com/containers/podman-compose/archive/v1.0.6.tar.gz
Thanks for opening this bug. Python 3.6 is no longer supported on latest releases. The recommended solution is to use v1.0.6.
I'm not closing the issue because the current behavior is quite confusing. podman-compose should refuse to run and throw a descriptive error if the version of Python is too old.