Skip to content

Compatibility with Github actions and Python 3.10 #4056

@sondrelg

Description

@sondrelg
  • 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions