Compatibility with Github actions and Python 3.10
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Background
Hi!
I maintain this little github action for setting up and configuring Poetry. Since Python 3.10 is on the horizon and the first beta version has just been released we thought it would be nice to take a crack at making the action compatible (see this PR), but we’re having some difficulties.
Specifically we’re seeing this error:
Traceback (most recent call last):
File "/home/runner/.poetry/bin/poetry", line 17, in <module>
from poetry.console import main
File "/home/runner/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
from .application import Application
File "/home/runner/.poetry/lib/poetry/console/application.py", line 3, in <module>
from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo'
This error seems to be referenced in a number of issues, but generally in relation to a self upgrade
or reinstalls (see #553, #3071, #3345). In our case, this looks like it’s happening on fresh installs on Python 3.10 specifically.
MVP
We’re seeing the error whenever we try to use the get-poetry
script in conjunction with Python 3.10.0-beta.1
Here is an example run of the following workflow, where Poetry seemingly installs successfully, but then fails on poetry install
:
name: tests
on: pull_request
jobs:
test-python-310:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.10.0-beta.1
- run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - --yes --version=1.1.6
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- run: poetry install
For context, we saw the exact same errors for the previous alpha versions of Python 3.10.
Do you have any idea what might be causing this?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9
I have been using Poetry 1.1.4 and 1.1.6 with Python 3.10rc in a pipeline for the last couple of months without issue. I simply used
pip install poetry
.But now I changed several things and among others, I’m using the
get-poetry.py
script and got this same error when runningpoetry install
, which is why I came here. Maybe is that why they’re deprecating the script in favour ofinstall-poetry.py
? I don’t like the new one because it doesn’t check any hash and simply doespip install poetry
…In all my tests I used the Debian slim Python Docker image.
I will update this if I get more info on what’s going on.
Yup, it does work great! Tried it in latest
python:3.10-rc-slim
(python@sha256:f5aa74257dc03d74b9810a97d79d2ea01d2ecdb5139390749e506098a7fc2fc3
)