by korijn · 7y ago · 0 comments
Anyway, has Poetry caught up to the dependency resolution provided by the pipenv lock command yet? Last time I tried it (~6 months ago), it couldn't produce working environments for my requirements.
BTW, for anyone who wants to educate themselves, read the issue description here and follow the links: https://github.com/pypa/pip/issues/988
Was the problem with dependency resolution you had similar to what Poetry describes in it README? Or are there other problems the README fails to mention?
The description they make got me interested, but up to now all alternatives I tried to build moderately complex python projects failed to deliver on their promises, so definitely interested in what you have to say.
[1] https://github.com/sdispater/poetry/blob/master/README.md#de...
Been meaning to look into poetry. Not a huge fan of TOML, but hopefully all the tooling supports pyproject.toml now (I know black does, but not sure about flake8, isort, pylint, pytest, coverage). I know there's still some hacks required for tox + poetry though.
I found the tox support a bit hacky, but not bad, and got 3.5 to 3.8 testing just fine.
Poetry does make the publishing process pretty seamless for the simple case. If you're starting a new library, poetry is great.
I think poetry needs a "fuzz option" to test random valid solutions to the version constraints, to check if the older versions are really valid.
What config language would you prefer to use instead?
I roughly agree with the arguments laid out in PEP 518, even though the array of tables thing is not at all "obvious" to me. And I actually do think an "official"/semi-official YAML subset would be great for loads of use-cases - yaml.safe_load already is that in practice.
I've tried similar configurations with poetry and it doesn't seem to have a problem with them.
It is important to apply pipenv as intended; I only use `pipenv lock` and `pipenv sync`, and edit Pipfile manually.
The problem with other commands such as `pipenv install` is that they don't apply the holistic dependency resolution as `pipenv lock` does.
Perhaps "as intended" is not a correct assumption on my part.
iirc Poetry does have cross-platform lock files and a coherent story. I'm just blocked on some PRs due to the original author getting busy and not yet having delegated to lieutenants.
But it doesn't handle platform-specific dependencies correctly.
For instance, `doit` has a watch feature, and it will depend on pyinotify on linux and macfsevents on Mac.
If I run pipenv lock on the Mac, it correctly generates this:
"macfsevents": {
"hashes": [
"sha256:hexhexhex..."
],
"markers": "sys_platform == 'darwin'",
"version": "==0.8.1"
},
But it won't lock the linux version. Similarly, if you lock on Linux, it throws out macfsevents. And `doit` is not doing anything strange[1] to report these extra dependencies.[1]: https://github.com/pydoit/doit/blob/660d3a2e75dc9d861e5a8916...
$ pip freeze |wc -l
204