Open ilyagr opened 12 months ago
Previously: #7170.
People probably also try to self update
installations made by some other means altogether eg their package manager. Perhaps it wouldn't be the worst idea for the poetry installer to leave behind some sort of marker file that poetry self
could look for - and just bail out if not found.
As usual: if you care about this, then a pull request is overwhelmingly the most likely way to make something happen.
I hit this but in a slightly different way with plugins today. Hope this posts helps someone else like me in the future, and maybe contributes to the core fix here!
End result is poetry is unusable and I get No module named 'poetry.core.semver'
To replicate
pipx install poetry
poetry self add "poetry-dynamic-versioning[plugin]"
Here's the output of 2 above which shows pretty clearly what's going on
poetry self add "poetry-dynamic-versioning[plugin]"
Using version ^1.2.0 for poetry-dynamic-versioning
Updating dependencies
Resolving dependencies... (0.2s)
Warning: The locked version 0.3.5 for poetry-types is a yanked version. Reason for being yanked: Incompatible with poetry>=1.5
Package operations: 2 installs, 20 updates, 0 removals
β’ Downgrading cffi (1.16.0 -> 1.15.1)
β’ Downgrading certifi (2024.2.2 -> 2022.12.7)
β’ Downgrading charset-normalizer (3.3.2 -> 3.0.1)
β’ Downgrading cryptography (42.0.4 -> 39.0.0)
β’ Downgrading idna (3.6 -> 3.4)
β’ Downgrading more-itertools (10.2.0 -> 9.0.0)
β’ Installing pyparsing (3.0.9)
β’ Downgrading urllib3 (2.2.1 -> 1.26.14)
β’ Downgrading zipp (3.17.0 -> 3.11.0)
β’ Downgrading importlib-metadata (7.0.1 -> 4.13.0)
β’ Downgrading jaraco-classes (3.3.1 -> 3.2.3)
β’ Downgrading msgpack (1.0.7 -> 1.0.4)
β’ Downgrading packaging (23.2 -> 21.3)
β’ Downgrading requests (2.31.0 -> 2.28.2)
β’ Downgrading markupsafe (2.1.5 -> 2.1.1)
β’ Downgrading pexpect (4.9.0 -> 4.8.0)
β’ Downgrading requests-toolbelt (1.0.0 -> 0.10.1)
β’ Downgrading shellingham (1.5.4 -> 1.5.0.post1)
β’ Downgrading tomlkit (0.12.3 -> 0.11.6)
β’ Downgrading trove-classifiers (2024.2.22 -> 2023.1.12)
β’ Downgrading jinja2 (3.1.3 -> 3.1.2)
β’ Installing poetry-types (0.3.5)
Warning: The file chosen for install of poetry-types 0.3.5 (poetry_types-0.3.5-py3-none-any.whl) is yanked. Reason for being yanked: Incompatible with poetry>=1.5
The work around is to not use poetry self add
for plugins for poetry installed with pipx. Instead use pipx inject poetry poetry-dynamic-versioning[plugin]
Poetry version: 1.6.2 and 1.7.0
Python version: 3.11.6
OS version and name: Debian testing
pyproject.toml: n/a
[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.
[ ] If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
I tried upgrading from
poetry 1.6.2
, installed viapipx
, topoetry 1.7.0
withpoetry self update
. The result was the error below.I'm using
pipx
1.2.1 and python 3.11.6 on Debian.I believe that
poetry self update
should either callpipx upgrade
or tell the user to do it, unless it's deprecated as per #7872.I think/hope most people will figure out the problem, so this is not a major issue, but it'd still be nice to see fixed.