-
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
Ship Poetry releases with pinned dependencies #7990
Comments
Hey @johnthagen, this have been requested already earlier. While we agree this would be useful, we haven't found a working solution here. The main problems are poetry plugins. If we pin Poetry's own dependencies, these versions might be incompatible to the version a plugin needs. Suggestions on how to solve this are welcome. fin swimmer |
Thanks for the feedback. That is a good point. Would it help at all if there was a scheme for poetry plugins to target supported Poetry versions? Basically, put the responsibility on the plugin to have dependency compatibility with a specific version of Poetry. There is also the binary distribution approach, publishing Poetry with something like PyInstaller or PyOxidizer, but that likely would cause even more issues for supporting plugins. |
@finswimmer One short-term idea that would help mitigate this problem is if This would help alleviate dependency drift between uses updating Poetry and cleanly installing, while still only needing to learn/teach a single Any thoughts on that as a shorter term first step? |
Related, a proposal to remove |
The commands used as a workaround for this issue:
Raise the following warning that will become an error in the future:
There is no |
As an example, If Poetry had pinned dependencies, this would not have affected Poetry users. |
@johnthagen What do you think about a |
@radoering interesting! So would the end use case for Poetry be
To me it seems this could solve the issue? Would |
@radoering interesting approach, however I was thinking something different. My idea was to add a |
I did not test it but I would think so, too.
The big drawback is that users will have no chance to pick up bugfixes in dependencies without a new Poetry release in that case. Personally, I would prefer being able to update dependencies. |
Yeah, this is definitely one tradeoff, but I feel like in practice having the user community spread across many separate sets of dependencies also picks up new bugs that the Poetry devs have never been able to test locally or CI. I also wonder if we do go this route, perhaps the frequency of bug fix releases could be increased and along with those, new locked dependencies? So everyone is still in lock step, but getting somewhat regular patch updates. Just some thoughts. Appreciate you all's work on Poetry! |
I would even say, we would have to release more often if we were to pin dependencies for all users. I'm thinking of If we chose the extra, probably, the pressure to do a new release would be smaller because users can update if they care. On the other side, users of the |
Feature Request
I propose that Poetry itself is distributed with locked/pinned dependencies for each release. This makes each Poetry release reproducible and consistent for all users. This treats Poetry more like an application than a library/package, which is how users interact with it.
Currently Poetry gets installed as a Python package with bounds on its dependencies rather than being pinned/locked. This means that if User A installs Poetry version
X
, and later User B installs versionX
, and User C upgrades to versionX
from versionW
, all three of these users can result in different Poetry installations with subtly different dependencies.This can lead to some hard to undderstand/fix issues such as:
Within teams, it can also make it harder to debug why one developer's Poetry is acting in an odd way with the same version of Poetry than anothers, because their transitive dependencies Poetry is riding on top of are different.
I've noticed that if you simply run
poetry update
to update Poetry as described in the docs, then your dependencies tend to lag behind what you'd get if you did a fresh install or instead ran the more verbosepoetry self lock && poetry self update
.I believe this could also help make triaging tickets better, as maintainers could know that if a user reports an issue with Poetry version
X
, the maintainer can reproduce the exact transitive dependencies that user has.In this idea, we could remove
poetry self lock
,poetry self install
, etc. and simply usepoetry update
to look for a new Poetry version, and install it and it's locked dependencies into the environment.The text was updated successfully, but these errors were encountered: