Live data from Hacker News

What the Heck Is Pyproject.toml?

snarky.ca

51–60 of 199 posts

Re: What the Heck Is Pyproject.toml?

#51
post #44

Earlier quoted context omitted.

Do note that Python the language is developed by a separate group as Python the packaging ecosystem. So even when Guido was a BDFL he completely stayed out of the packaging situation. And there is a packaging BDFL, but there's a severe lack of time and effort in the form of volunteers to tackle a lot of the projects, big or small. Plus rolling these things out takes years and it takes even longer to gain traction as…

This is BS. most other languages, with the same constraints, have done far better. Take Ruby as one example.

Yes, Python’s packaging is partly bad because it’s based on C extensions, which are intrinsically bad, but it’s also just plain bad compared to its peers, like Ruby and NPM.

Re: What the Heck Is Pyproject.toml?

#52

Is toml even supported in the standard library? This seems just bizarre. Python's really overtaking node for massive churn. I feel like an old guy when peers say, "don't use virtual environment use pipenv." then someone says no no don't even use that, use poetry. Etc. I think about 50% of why I enjoy, in my soul, about Rust when I'm hacking away and personal goofs is that the dependency and project management system…

Here's their justification for using it. It makes sense to me.

https://www.python.org/dev/peps/pep-0518/#overview-of-file-f...

Re: What the Heck Is Pyproject.toml?

#53
post #44

Earlier quoted context omitted.

Do note that Python the language is developed by a separate group as Python the packaging ecosystem. So even when Guido was a BDFL he completely stayed out of the packaging situation. And there is a packaging BDFL, but there's a severe lack of time and effort in the form of volunteers to tackle a lot of the projects, big or small. Plus rolling these things out takes years and it takes even longer to gain traction as…

This is BS. most other languages, with the same constraints, have done far better. Take Ruby as one example.

Ruby serves one ecosystem (web), barely.

Python serves several huge ones: web, datascience, 3d graphics, sysadmin... all with different needs, different conventions, different “standard” tools to do this and that. The community is orders of magnitude bigger than ruby by now, and anything that requires coordination is much harder to accomplish than in a lot of other ecosystems.

Python is now on par with ecosystems like C/C++ (where different build and packaging conventions are legions) or Java (where ever 10 years they write a new build tool on top of the previous one(s) to hide the complexity, and still, like python, they struggle to make simple executables 30 years on...). It’s just a hard problem to cater for so many different needs.

Re: What the Heck Is Pyproject.toml?

#54
post #45
post #42

Earlier quoted context omitted.

Poetry is...a little quirky. I've seen it go into infinite loops trying to resolve projects with, like, 10 dependencies. I'm not really sold on it being better than just making a virtualenv and pip installing.

How do other people replicate your venv? How does production replicate your venv?

Pipenv still works for me with everything version pinned.

Re: What the Heck Is Pyproject.toml?

#55

Earlier quoted context omitted.

Poetry is a modern packaging system for Python. It's really good. I hope everyone converges on it. http://python-poetry.org/

Where is that XKCD about new standards... Ah yes: https://xkcd.com/927/

Also https://xkcd.com/1987/

Re: What the Heck Is Pyproject.toml?

#56
post #44

Earlier quoted context omitted.

This is BS. most other languages, with the same constraints, have done far better. Take Ruby as one example.

Yes, Python’s packaging is partly bad because it’s based on C extensions, which are intrinsically bad, but it’s also just plain bad compared to its peers, like Ruby and NPM.

What exactly is "intrinsically bad" about extensions written in C?

Re: What the Heck Is Pyproject.toml?

#57

Is toml even supported in the standard library? This seems just bizarre. Python's really overtaking node for massive churn. I feel like an old guy when peers say, "don't use virtual environment use pipenv." then someone says no no don't even use that, use poetry. Etc. I think about 50% of why I enjoy, in my soul, about Rust when I'm hacking away and personal goofs is that the dependency and project management system…

Here's their justification for using it. It makes sense to me. https://www.python.org/dev/peps/pep-0518/#overview-of-file-f...

It makes sense to use toml. It makes zero sense not to bring pytoml in the stdlib before doing so. The way this was handled is a little absurd.

Re: What the Heck Is Pyproject.toml?

#58
post #22

Earlier quoted context omitted.

I teach Python to some middle school kids. Pip vs Pip3 and PYTHONPATH wasted entirety of two class sessions. By the way, Python should go beyond Go. It should single binary the someone can install without root privileges. The fact that I have hundreds of Chromebooks at my school and I can’t use any of them - school IT, correctly, doesn’t want me mucking with advanced settings.

People would love to see that happen, but it requires time and effort from people to build such a solution. Some people are trying, e.g. https://pyoxidizer.readthedocs.io/ and https://briefcase.readthedocs.io/ as well as stalwarts like PyInstaller and such. But as I said, it takes time and effort and there's only so much of that when it's being done by volunteers in their evenings and weekends. And as an aside, I wou…

Thanks for the links - pyoxidizer looks promising with some good docs and being built on rust (but it won't work with QT's PySide2 likely until the next major release[0]), while briefcase looks to have been tailored to "beeware" usage and is lacking any standalone usage information. Hoping both these work out, PyInstaller works but other options would be welcomed.

0: https://github.com/indygreg/PyOxidizer/issues/228#issuecomme...

Re: What the Heck Is Pyproject.toml?

#59
post #9
post #6

Earlier quoted context omitted.

I haven't looked much into it myself, but I've heard good things about Poetry [0]. 0: https://python-poetry.org/

This looks great. Can anyone who's used both comment on how poetry compares to yarn[0]? [0] https://yarnpkg.com/

I think of Poetry as the Yarn of Python packaging for two main reasons (apart from package locking, which is the biggest similarity): the commands are more intuitive and the lockfile starts with a different letter from the dependency file. I don't know how many times I open package-lock.json instead of package.json because I tab-complete from my shell. Same with Pipfile and Pipfile.lock for anyone using Pipenv.

I wrote this post[0] that compares Poetry and Pipenv if you're interested and talks about some of their differences. Poetry has both add and install commands, whereas Pipenv only has an install command, for instance.

[0] https://johnfraney.ca/posts/2019/03/06/pipenv-poetry-benchma...

Re: What the Heck Is Pyproject.toml?

#60

Python desperately needs a better packaging solution than pip from Python Software Foundation. Stop all new features until this - the biggest pain point for Python across all expertise levels from newbies to experienced Python programmers - is officially solved. No pipenv, no poetry, no conda, etc from third party devs who sometimes get tired of the pressure [1]. It is immense. Combine all this virtualenv stuff with…

Poetry is a modern packaging system for Python. It's really good. I hope everyone converges on it. http://python-poetry.org/

We've recently standardized on using Poetry at JP Morgan Chase for projects in our Organization. We're betting on it becoming a standardized tool everywhere.
Post reply on HN