-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry's internal poetry.lock can get into a weird state when changing Python versions #9841
Comments
Mixing pipx installation with There are existing issues saying similar. |
That's fair, but I can reproduce it without using Pipx. I think the crux of the issue is that the internal
|
Same thing. Iirc |
possibly not even that. I never use the installer so I am not totally sure, but perhaps it too will behave the same way.
|
Hmm, #7170 definitely sounds like the same issue. #6456 is a bit different - that should occur regardless of how Poetry is installed. Just to be clear, do you think that essentially the only reason the internal |
I dont know that it even did get into a "weird" state, it probably is a perfectly good lock file but it just happens that the solution that it gives includes a version of msgpack that does not have wheels for python3.13, and which your system is not set up to build. That solution is likely influenced in some way by the unlocked environment from the original install, but I doubt that it will be useful or interesting to figure out exactly what combination of circumstances lead to that outcome. For me anyway, it is a lot simpler to advise: avoid |
also the Or is that from the poetry installation? Did you perhaps previously do a After the The solution is going to be to use one or the other mechanism consistently (and imo preferably "not |
Yes, the pypoetry.zip attachment contains my
I've certainly used a mix of
Results in:
The downgrade "makes sense" in terms of the lock file, but it's probably not something the user would want in this situation. If you first run The installer script's |
IMO we should be running less |
Description
I maintain a Poetry plugin, and I got a report (mtkennerly/poetry-dynamic-versioning#198) about issues installing it with Python 3.13. It seems that changing Python versions may result in strange behavior with Poetry's internal
poetry.lock
file. Specifically, when I would try to install the plugin, Poetry would downgrade some dependencies that weren't related to the plugin, and some of those downgrades would fail to install.I had to delete
%APPDATA%/pypoetry/poetry.lock
in order to make the plugin installation work. I also found that, instead of deleting it, I could runpoetry-py3.13 self lock
, which would update the lock file, and then the plugin installation would work.To reproduce:
poetry.lock
from pypoetry.zippy -3.13 -m pipx install --suffix='-py3.13' poetry
)poetry-py3.13 self add "poetry-dynamic-versioning[plugin]"
Would it be possible for Poetry to detect that the Python version has changed and recommend resetting/updating the internal
poetry.lock
?Workarounds
%APPDATA%/pypoetry/poetry.lock
.poetry-py3.13 self lock
first before trying to install the plugin.Poetry Installation Method
pipx
Operating System
Windows 11
Poetry Version
Poetry (version 1.8.4)
Poetry Configuration
Python Sysconfig
Example pyproject.toml
No response
Poetry Runtime Logs
The text was updated successfully, but these errors were encountered: