Replies: 1 comment
-
|
Hello @Lalufu,
Yes.
Yes,
Another possible solution that might come up soon, is a poetry plugin that can build a wheel with pinned version. Than you can pip install this wheel. fin swimmer |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue
I have a question regarding dependency resolution in poetry when using
pip installto install a package that is managed by it. I did not find a clear answer to this in the documentation.My understanding of dependency resolution in poetry is the following:
pyproject.tomlI define my dependencies for development and runtimepoetry add.poetry installwill take all these dependencies, build the tree, find a solution that satisfies all the different direct and indirect dependency requirements, installs those packages in the versions determined, and writes the chosen version numbers intopoetry.lock.poetry.lockshould be version controlled, so that multiple people working on the same project get the same versions of dependencies.poetry update, which will reevaluate the tree and updatepoetry.lock, if required.So far this is clear to me and makes sense.
However, when a poetry managed package is installed via
pip install, what seems to happen is that the pip install process runs another dependency resolution process, looking only atpyproject.toml, and not atpoetry.lock. This is even thoughbuild-backend = "poetry.core.masonry.api"is present in thepyproject.tomlfile. This might lead topip installpicking different dependency versions thanpoetry installdid. I would expectpip installwith the poetry build backend to look atpoetry.lockto make sure end users get the exact same dependency versions that the package was developed and tested with.pip installdoes not consultpoetry.lock?Beta Was this translation helpful? Give feedback.
All reactions