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.

Pipelines broken upgrading 1.2.2 to 1.3+ on Windows

See original GitHub issue
  • 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:

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
neersightedcommented, Dec 20, 2022

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.

pipx install --pip-args=--contraint=poetry-constraints.txt poetry

poetry-constraints.txt:

poetry==1.3.1
1reaction
neersightedcommented, Dec 20, 2022

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:

--pip-args=--constraint=.github/workflows/constraints.txt

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:

  • Download the packages you requested according to the newest version allowed by the constraints you provide.
  • Check if all their dependencies (per their constraints) are locally available, and fetch the newest version allowed if not.
  • Repeat this recursively until it has every dependency.
  • Check for incompatibility and attempt to fetch alternate versions if constraints conflict.

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:

  • Use the suggested way to install with pipx, and do not inject additional constraints into Poetry’s environment.
  • Simply pipx install poetry and then note the versions pip solved with, replacing the other versions in your constraints.txt.
  • Bail out of using pip’s solver by providing a full resolution with the output of 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure DevOpsServer 2020 Update 1 Release Notes
Azure DevOps Server 2020 introduces a new pipeline run (build) retention model that works based on project-level settings. Azure DevOps Server ...
Read more >
Update to enable TLS 1.1 and TLS 1.2 as default secure ...
Describes an update that adds TLS 1.1 and TLS 1.2 to default security protocols in Windows Server 2012, Windows 7 SP1, and Windows...
Read more >
Azure PowerShell release notes - Microsoft Learn
[Breaking Change] Upgraded API version for ActivityLogAlert from 2017-04-01 to 2020-10-01, affected cmdlets: 'Get-AzActivityLogAlert'; 'Remove- ...
Read more >
Safely Upgrade Your Pipelines from Azure DevOps Server ...
Learn how to upgrade from Azure DevOps Server 2019 to Server 2020 without losing builds.
Read more >
[MS-PSRP]: Connecting to a RunspacePool from a ... - Microsoft Learn
The client discovers the Command identifier for the pipeline to connect to (section ... and initializes the pipeline state to Running (section 3.1.1.3.2)....
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