question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

2reactions
HacKanCuBacommented, May 13, 2021

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 running poetry install, which is why I came here. Maybe is that why they’re deprecating the script in favour of install-poetry.py? I don’t like the new one because it doesn’t check any hash and simply does pip 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.

1reaction
HacKanCuBacommented, Jun 2, 2021

Yup, it does work great! Tried it in latest python:3.10-rc-slim (python@sha256:f5aa74257dc03d74b9810a97d79d2ea01d2ecdb5139390749e506098a7fc2fc3)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 3.10 not recognized · Issue #160 · actions/setup-python
Steps to reproduce the behavior: Try adding 3.10 to the list of python-version without quotes. Run/Repo Url. https://github.com/adamjstewart ...
Read more >
Support 3.10 · Issue #249 · actions/setup-python - GitHub
Hello everyone! Python 3.10.0 is already available via the setup-python action. Unfortunately, it is not pre-installed on the images yet. New ...
Read more >
Add Python 3.10 to GitHub Actions
Automated CI toolchain to produce precompiled opencv-python, opencv-python-headless, opencv-contrib-python and opencv-contrib-python-headless packages.
Read more >
actions/setup-python - GitHub
This action provides the following functionality for GitHub Actions users: Installing a version of Python or PyPy and (by default) adding it to...
Read more >
DOC: Note Python 3.10 compatibility - GitHub
... Python 3.10 compatibility · python-versioneer/python-versioneer@976cb00. ... .github/workflows/tox.yml at 976cb00 ... pip install tox tox-gh-actions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found