Hi folks! Maybe this is of knowledge of some of our community members, maybe not. But we faced a dependency resolution issue a couple of months ago.
One of the libraries we use changed it’s dependencies and pip wasn’t able to find the best scenario for keep everything in order. Our way to solve this at the time was to pin down a specific version of the library and move on.
At the same time, I remembered of my happy times using poetry. It was an answer to some issues(most of it was resolver issues) I had with pipenv
. Also, it introduced some nice things like parallel downloads, a single configuration file using pyproject.toml
and also build capabilities.
So, with all crumbling down, why not test to see how it could solve the resolve issue?
Here’s some data:
Installing pulpcore
into a virtualenv
using pip:
time pip install pulpcore/
[...]
real 0m19.447s
user 0m12.406s
sys 0m2.151s
and installing the same projects into a virtualenv
using poetry
:
time poetry install
[...]
Installing the current project: pulpcore (3.30.0)
real 0m5.283s
user 0m5.365s
sys 0m1.515s
Here is an example of the generated poetry.lock
file.
After talking about this in the Pulpcore Meeting, I recovered some discussions and tries about this migration, which can be found here and here
I wanted to bring up this discussion and hear from you all (build gang, I’m talking to you)!
Here are some pros and cons:
Pros
- Lockfile mechanism.
- Reproducible builds.
- Parallel downloads.
- Supports editable installations (mainly used for development purposes)
- …
Cons
- I really don’t know how we’ll deal with multiple Pulp version we need to maintain
- …
Some test scenarios:
- Rebuild our images using
poetry
. - Install
pulp
usingvirtualenv
environments. - Install
pulp
directly on the environment root. - …
I would love to hear from you. Feel free to sugest test scenarios and other things.