poetry icon indicating copy to clipboard operation
poetry copied to clipboard

poetry self show: Because poetry-instance depends on poetry (1.3.0) which doesn't match any versions, version solving failed.

Open clintonroy opened this issue 2 years ago • 3 comments

1.3.0<!-- Replace with version, e.g. from poetry --version --> 3.9 alma linux 9.1: None:

  • [ x] I am on the latest stable Poetry version, installed using a recommended method.
  • [ x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [ x] I have consulted the FAQ and blog for any relevant entries or release notes.
  • [ x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Upgrading from 1.2.2 to 1.3.0 seems to break poetry self show. It can be fixed again by re running poetry self lock, but it seems a bit weird.

FROM almalinux:9.1
RUN dnf install -y python3-pip
ENV PATH=/root/.local/bin:$PATH
RUN python3 -m pip install pipx
RUN pipx install poetry==1.2.2
RUN poetry self lock
RUN poetry self show
RUN pipx install --force poetry==1.3.0
RUN poetry self show

Results in

Because poetry-instance depends on poetry (1.3.0) which doesn't match any versions, version solving failed.

clintonroy avatar Dec 11 '22 02:12 clintonroy

A tiny bit of thinking, maybe self show after the upgrade should be prompting for the self lock to be run, as it's out of sync?

clintonroy avatar Dec 11 '22 03:12 clintonroy

I wouldn't expect to mix poetry self commands with a pipx-managed installation, they're quite different mechanisms.

I use pipx myself, and updated my poetry installation with pipx upgrade poetry.

Possibly the docs could say more on such matters? Though it's not the place of the poetry docs to tell folk how to use pipx...

dimbleby avatar Dec 11 '22 11:12 dimbleby

Having the same error on poetry self show with clean install of poetry (1.3.2), using official installer, with custom POETRY_HOME. Using ubuntu jammy with python 3.10.6

maticus avatar Feb 14 '23 16:02 maticus

Considering that

  1. The docs now correctly mention that a pipx installation should be upgraded through pipx upgrade poetry: https://python-poetry.org/docs/#installing-with-pipx
  2. Mixing pipx with poetry self is definitely not a good practice
  3. We are talking about an older release of Poetry

I'm fairly confident nobody will ever work on this. I'll close the issue.

ralbertazzi avatar Jun 01 '23 15:06 ralbertazzi

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.

github-actions[bot] avatar Feb 29 '24 12:02 github-actions[bot]