News for hackers. Stuff that matters.
Re:Thoughts on the Python Packaging Ecosystem by AlphaSite on Sunday January 22, 2023 @01:01AM (#34474804)
Even if pip was a little better I still wouldn’t use it, because Poetry solves the problem so well you’d need to pull it out of my cold hands. It solves not only the install package problem, but locking, venvs, project structure and packaging in a well integrated solution with a fantastic UX.

If poetry (or similar) were renamed to Pip and it were to be included in the stdlib id obviously switch.

It doesn’t solve the single static binary problem or docs problems, but it’s much much closer.

Re:Thoughts on the Python Packaging Ecosystem by 411111111111111 on Sunday January 22, 2023 @02:44AM (#34475279)
Everytime you install a package through poetry, you're also running pip code.

You didn't even understand the point they made: the need for Pipenv and poetry would pretty much go away if pip added support for a proper lockfile and venvs. And that's the only correct choices as pip is already pythons package manager.

Re:Thoughts on the Python Packaging Ecosystem by bombolo on Sunday January 22, 2023 @03:36AM (#34475507)
What's the problem with first doing the venv thing and then running pip?
Re:Thoughts on the Python Packaging Ecosystem by numbsafari on Sunday January 22, 2023 @04:05AM (#34475637)
Any multi step process is guaranteed to produce random assortments of workflow tools to manage those steps which will seek to replace the original process as the one true process.

If there two steps, one part of the community will insist they belong in: a makefile, bash script, python script, lambda network service, bazel, pants, scons, terraform, ansible, npm …

Re:Thoughts on the Python Packaging Ecosystem by bombolo on Sunday January 22, 2023 @09:07AM (#34477518)
So we should have 1 single shell command to do literally everything?
Re:Thoughts on the Python Packaging Ecosystem by 411111111111111 on Sunday January 22, 2023 @09:26AM (#34477659)
before poetry and pipenv was a thing, pretty much everyone was recommending the virtualenvwrapper script instead of using venv directly... so yes, thats what it ultimetaly always ends up as.
Re:Thoughts on the Python Packaging Ecosystem by bombolo on Sunday January 22, 2023 @11:17AM (#34478848)
One might invest 20 seconds to learn how to use it, but to each their own :)
Re:Thoughts on the Python Packaging Ecosystem by numbsafari on Sunday January 22, 2023 @10:11AM (#34478083)
Not what I would or wouldn’t do personally, but what happens generally in practice.
Re:Thoughts on the Python Packaging Ecosystem by meandmycode on Sunday January 22, 2023 @03:21AM (#34475440)
Poetry ended up being mostly a disappointment having used it for the last 18 months. First time installs were eventually an hour long to resolve, and lock files were platform specific, making using them for reproducibility almost useless. The wider python ecosystem is frankly painful to productionize even today and it really does need some focus and governance.
Re:Thoughts on the Python Packaging Ecosystem by dmr_92 on Sunday January 22, 2023 @03:55AM (#34475590)
Are you sure the lockfiles are platform-specific?

I spent a long time migrating a project to use poetry. One of the reasons I opted for poetry over others was that the lockfile retained all of the environment markers in the packaging metadata, so that the lockfile could support multiple interpreters and interpreter versions, multiple platforms, etc.

Re:Thoughts on the Python Packaging Ecosystem by woodruffw on Sunday January 22, 2023 @10:04AM (#34478009)
I can't speak for Poetry directly, but knowing how Python dependency resolution works: I don't think Poetry can make lockfiles not platform-specific, since package source distributions are allowed to (and regularly do) run platform-specific code for their own dependency selection logic.

For example, your package might depend on `foo`, which in turn could sniff the host OS and select the appropriate subdependency. You'd then end up pinning that subdependency, which would be incorrect on a different host OS.

(Similarly for Python versions: a subdependency might be required on < 3.7, so re-installing from a lockfile generated from an older Python could produce a spurious runtime dependency.)

Re:Thoughts on the Python Packaging Ecosystem by ivoflipse on Sunday January 22, 2023 @04:51AM (#34475863)
If you use C-extensions or platform specific packages like pywin32, how would.you expect them to NOT be platform specific? Would you want it to only allow pure Python packages?
Re:Thoughts on the Python Packaging Ecosystem by adammarples on Sunday January 22, 2023 @06:02PM (#34483254)
I've given up on poetry. I still to this day can't get it to use the active version of python, which you'd think would be the default. Even after setting the config flag. Setting the config flag somehow made things worse, all my poetry envs started using the wrong python. I can't even force it to use the version I want with 'env use /path/to/python', I can only pass stuff like 'env use 3.9'. What the hell is 3.9? I want to pass a specific path to a version I have.