poetry: Pipelines broken upgrading 1.2.2 to 1.3+ on Windows
- Poetry version: 1.3.1
- Python version: 3.10.8 and 3.11.1
- OS version and name: Ubuntu
- pyproject.toml:
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.
Issue
When upgrading the constraints to poetry==1.3.1 we get on logs:
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
creating virtual environment...
installing poetry...
Fatal error from pip prevented installation. Full pip output in file:
C:\Program Files (x86)\pipx\logs\cmd_2022-12-18_15.24.01_pip_errors.log
pip seemed to fail to build package:
html5lib<2.0,>=1.0
Some possibly relevant errors from pip install:
ERROR: Cannot install poetry==1.3.1 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Error installing poetry.
Logs can be seen in these repos:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
If you just want to have Dependabot bump Poetry for you, removing all other versions from the constraints.txt you use should be sufficient:
e.g.
poetry-constraints.txt:
We are well aware you are using pipx. However, pipx merely wraps pip, and thus uses pip’s solver.
You can see from the file that you linked that you are directly passing arguments to pip, which is wrapped by pipx:
Injecting additional constraints is not in fact, the suggested/supported usage of
pipx
.Furthermore, solving is involved here. You have not provided a fully-specified solution to pip, so it will do the following:
pip solves at install time, without a locking stage like Poetry. Poetry is just another package, and what is happening here is that your constraints are complex enough that pip is failing to come up with a working resolution on every platform.
There are three paths forward here:
pipx install poetry
and then note the versions pip solved with, replacing the other versions in your constraints.txt.poetry export
as a requirements/constraints file (if you provide every package, pip will just check compatibility and will not need to solve anything).Your previous usage happened to work as the intersection of Poetry + your other constraints was solvable by pip. That is no longer true. We, the Poetry project, do not support install methods other than the ones we specify, and the only packages we provide are high-quality Python packages (no different from/special in comparison to anything else on PyPI).
If you try to do something more fancy/opinionated than a ‘standard’ install method like
pip install
(e.g. add--constraints
to restrict the solution space pip uses), you are responsible for maintaining it.