Live data from Hacker News

What the Heck Is Pyproject.toml?

snarky.ca

41–50 of 199 posts

Re: What the Heck Is Pyproject.toml?

#41
post #3

Earlier quoted context omitted.

All of those setup options are now setup.cfg options: https://docs.python.org/3/distutils/configfile.html At least, that's supposed to be the case; I am not 100% certain that it always is. However, even so, AFAIK setup.cfg does not directly support using third-party libraries to compute the setup options, as your setup.py does. The only workaround I'm aware of for that if you want to get rid of setup.py is to have a…

I get the idea -- but, how do I tell Cython "it's time to compile things now" from a file I can't execute?

> how do I tell Cython "it's time to compile things now" from a file I can't execute?

It looks like there are ways to specify which build tools your package requires; I would assume Cython would be one of the tools that can be specified since it's been around a while and gets a lot of usage, but I don't know for sure.

Re: What the Heck Is Pyproject.toml?

#42

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/

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.

Re: What the Heck Is Pyproject.toml?

#43
post #22

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…

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.

For that scenario (if you can’t use the Linux container on Chrome OS, which works even without flipping the devmode switch), repl.it is fantastic. It builds a fully working python (or C, or Java, or even a polyglot one that’s just Linux) environment, automatically deals with dependencies (if you type import pandas and it’s not installed, it gets installed), has synchronous collaboration and can even auto grade work with unit tests (at least, it was in beta last I checked). It’s the holy grail of learn- to-code software and it kicked butt in the class I used it in.

Re: What the Heck Is Pyproject.toml?

#44

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…

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.

Re: What the Heck Is Pyproject.toml?

#45
post #42

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/

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?

Re: What the Heck Is Pyproject.toml?

#46

I don’t want to be too negative, and I realize this isn’t an option for everyone ... but seriously, just use conda if you can. Judging from comments here and in the past, we all know packaging is one of Python’s Achilles’ heels. I spent a couple years bouncing around with pyenv/pipenv, then poetry, then back. I lovingly followed all the flamewars here and on github. Ultimately, I realize now, I laboured under the con…

I've had the opposite experience. I used conda for several years, primarily for data science, but regularly ran into problems with packages not working, updates for packages bring severely delayed, and issues with conda itself. Switched to pyenv+virtualenv 18 months ago and haven't had a single issue.

I believe both of our stories. I just always wonder how this happens that two people have such opposite experiences.

Re: What the Heck Is Pyproject.toml?

#47

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…

> Python is otherwise the most incredible language of our times By what metric(s)? It's based on statements, and not only on expressions. This is a fundamental issue that it has yet to grow out of.

Downvotes because of what I think about the language. Zealotry at it's finest.

Re: What the Heck Is Pyproject.toml?

#48

I don’t want to be too negative, and I realize this isn’t an option for everyone ... but seriously, just use conda if you can. Judging from comments here and in the past, we all know packaging is one of Python’s Achilles’ heels. I spent a couple years bouncing around with pyenv/pipenv, then poetry, then back. I lovingly followed all the flamewars here and on github. Ultimately, I realize now, I laboured under the con…

I've had the opposite experience. I used conda for several years, primarily for data science, but regularly ran into problems with packages not working, updates for packages bring severely delayed, and issues with conda itself. Switched to pyenv+virtualenv 18 months ago and haven't had a single issue. I believe both of our stories. I just always wonder how this happens that two people have such opposite experiences.

Ha!! Likewise, I believe you 100%. It’s fascinating isn’t it? Just goes to show what a diverse (and frankly wonderful) platform Python is, despite the warts.

If you don’t mind my asking, what kind of stuff we’re you working on? Just curious!

I have definitely found it’s easy to bork a conda install with updates, enough to make it easier to just wipe it out and start over.

I mostly work on financial software and only conda seemed to play nicely with pandas and brokerage APIs. I should probably mention that I do a lot of this is cross-platform and conda seemed to be the only thing that worked without a lot of tweaking on Windows, Mac and Linux consistently. But the Linux experience with pyenv and virtualenv (and pipenv too, for the most part) was great. If I was Linux-only I honestly might never have switched.

Re: What the Heck Is Pyproject.toml?

#49

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…

[deleted]

Re: What the Heck Is Pyproject.toml?

#50

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…

I am an experienced Python programmer. I often have to collaborate with people who are not. There is no greater hell than talking them through installing a working Python environment. It’s impossible.

Meanwhile, the pip project is full of developers who tell you that your problem is not a problem and you’re discouraging people by pointing out that they’re blame shifting: https://github.com/pypa/pip/issues/4995

I honestly have zero faith that things will get better without a radical change in leadership. Pyproject.toml is a good step in the right direction, but it’s been around for years. They had time for adding the walrus operator, but not for replacing the setuptools, venv, pip Cerberus.

Post reply on HN