-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Github actions and Python 3.10 #4056
Comments
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 But now I changed several things and among others, I'm using the 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. |
I see that I also tested the new |
I run
After pip-installing those, poetry fails again:
For the moment, the only viable way I see to install poetry under Python 3.10 is |
For reference, this was fixed with #3706. The solution is to use the new |
Since |
Does it really work? I tested it too, 20 days ago:
|
It does seem that way @HacKanCuBa 🙂 See this example run that I found through the last mention above. |
Awesome, thanks! Gonna try it in while :D 👯 |
Yup, it does work great! Tried it in latest |
python-poetry/poetry#3706 python-poetry/poetry#3870 python-poetry/poetry#4056 Poetry has a new install script, added in python-poetry/poetry#3706. The old get-poetry.py install script is not compatible with Python 3.10, so the new install-poetry.py script will be used. Docker builds and GitHub Actions workflows will be updated to use `POETRY_HOME=/opt/poetry` consistently. As of Poetry 1.1.7, there may be complications in Docker when using install-poetry.py without venvs (`POETRY_VIRTUALENVS_CREATE=false`). While installing dependencies, the following error is frequently seen: ```text OSError Could not find a suitable TLS CA certificate bundle, invalid path: /opt/poetry/venv/lib/python3.9/site-packages/certifi/cacert.pem at /opt/poetry/venv/lib/python3.9/site-packages/requests/adapters.py:227 in cert_verify ``` Poetry may be incorrectly attempting to read from its virtualenv if it's not respecting `POETRY_VIRTUALENVS_CREATE` (python-poetry/poetry#3870). Downstream steps also do not respect `POETRY_VIRTUALENVS_CREATE`, so the application does not run.
python-poetry/poetry#3706 python-poetry/poetry#3870 python-poetry/poetry#4056 Poetry has a new install script, added in python-poetry/poetry#3706. The old get-poetry.py install script is not compatible with Python 3.10. This commit will update the GitHub Actions workflow to use the new install-poetry.py script, with `POETRY_HOME=/opt/poetry` for consistent installs independent of user account, and will also update the workflow to use a virtualenv and run commands with `poetry run` to avoid issues with `POETRY_VIRTUALENVS_CREATE=false`. As of Poetry 1.1.7, there may be complications with install-poetry.py run without venvs (`POETRY_VIRTUALENVS_CREATE=false`). An error is seen: ```text OSError Could not find a suitable TLS CA certificate bundle, invalid path: /opt/poetry/venv/lib/python3.9/site-packages/certifi/cacert.pem at /opt/poetry/venv/lib/python3.9/site-packages/requests/adapters.py:227 in cert_verify ``` Poetry may be incorrectly attempting to read from its virtualenv if it's not respecting `POETRY_VIRTUALENVS_CREATE` (python-poetry/poetry#3870). Downstream steps also do not respect `POETRY_VIRTUALENVS_CREATE`, so the application does not run. To avoid these issues, `poetry run` can be prepended to commands to prompt Poetry to use its virtualenv. Additionally, Poetry errors out with a `JSONDecodeError` when attempting to install packages with Python 3.10 (python-poetry/poetry#4210). Python 3.10 support will be postponed until Poetry is compatible.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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:
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.1Here is an example run of the following workflow, where Poetry seemingly installs successfully, but then fails on
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?
The text was updated successfully, but these errors were encountered: