News for hackers. Stuff that matters.
Re:TOML – Tom's Obvious, Minimal Language by throwaway4007 on Thursday September 10, 2020 @08:18PM (#24437982)
I still don't understand why the Python steering committee decided to switch to this format for package configuration instead of the perfectly serviceable and existing setup.cfg. Packaging is already a pain to setup, now you gotta learn three (3) different ways to do it (if only to translate from one to the next) because everyone's split. The choice doesn't even matter very much, just settle on something whatever it is
Re:TOML – Tom's Obvious, Minimal Language by nuclear_eclipse on Thursday September 10, 2020 @09:28PM (#24438282)
They did settle on something: TOML, in PEP 517/518. There are a ton of in-progress PEPs building on top of PEP 518 to make pyproject.toml the place to put package metadata in a way that will actually be standardized and usable by multiple different packaging tools. setup.cfg is just a crappy form of ini file, with no standards for what it contains other than "what do common tools do". It's a mess, and it's going to get better, but it takes time because consensus is hard and we're all doing this for free.
Re:TOML – Tom's Obvious, Minimal Language by RedShift1 on Thursday September 10, 2020 @08:25PM (#24438017)
There's not much to learn. It's basically .ini on steroids.
Re:TOML – Tom's Obvious, Minimal Language by quotemstr on Thursday September 10, 2020 @09:16PM (#24438228)
It's not that it's hard. It's that it's different, and every difference has a cost. IMHO, and in the OP's opinion, the benefit of TOML for packages isn't worth the mental cost of having to know about three configuration methods.
Re:TOML – Tom's Obvious, Minimal Language by thayne on Thursday September 10, 2020 @09:17PM (#24438234)
What confuses me is why there isn't a toml module in the standard library.
Re:TOML – Tom's Obvious, Minimal Language by Bedon292 on Thursday September 10, 2020 @09:40PM (#24438347)
Yeah, that's an issue in flake8. There is no stable standard library for something that is supposed to be core to python moving forward.

https://gitlab.com/pycqa/flake8/-/issues/428#note_251982786

Re:TOML – Tom's Obvious, Minimal Language by nuclear_eclipse on Thursday September 10, 2020 @09:32PM (#24438308)
I think the general feeling in the community is that the standard library is where packages go to die. Once something is in the standard library, it can't get meaningful features/updates outside of the yearly release cycle. pip and setuptools are already vendoring a TOML implementation, and once you have pip, you can pick from multiple great toml implementations that are all under active development. Maybe once the packages/standards for TOML are finalized and the only thing left to do is fix bugs, maybe then we'll see a TOML implementation in the standard library, but in the modern age where you can fetch dependencies at any time, there's honestly not that much incentive for CPython developers to take on more burden of maintenance and development for the already-massive standard library.
Re:TOML – Tom's Obvious, Minimal Language by thayne on Thursday September 10, 2020 @11:04PM (#24438768)
> the standard library is where packages go to die

I totally understand that sentiment. But that does seem to contradict the "batteries included" philosophy. Then again pip itself seems like one of the batteries you would expect to be included, so maybe that philosophy is just no longer as relevant to python.

Re:TOML – Tom's Obvious, Minimal Language by afiori on Friday September 11, 2020 @02:56AM (#24439867)
my understanding is that the batteries included philosophy wasn't really successful. probably it would have been better if they had a smaller standard library providing core language-level functionality and then many blessed p packages that with independent versioning
Re:TOML – Tom's Obvious, Minimal Language by lmm on Friday September 11, 2020 @03:22AM (#24439994)
It was successful at the time. Remember Python is nearly 30 years old now, and has always had the worst dependency management of any major language.
Re:TOML – Tom's Obvious, Minimal Language by thayne on Saturday September 12, 2020 @12:24PM (#24453554)
I don't know c++ dependency management is pretty terrible.
Re:TOML – Tom's Obvious, Minimal Language by lmm on Friday September 11, 2020 @03:07AM (#24439914)
Python now includes pip itself in the standard library (which is a spectacularly poor decision IMO).
Re:TOML – Tom's Obvious, Minimal Language by nuclear_eclipse on Friday September 11, 2020 @04:44AM (#24440430)
Nit: the standard library includes a module to fetch and install pip. It doesn't include pip itself.