Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Poetry installs for install-poetry.py
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.
- Loading branch information