Live data from Hacker News

“Python's batteries are leaking”

pyfound.blogspot.com

201–210 of 420 posts

Re: “Python's batteries are leaking”

#201

Earlier quoted context omitted.

I think the biggest problem is going from zero third-party dependencies to one and more. Adding that very first one is a huge pain since there are many ways of doing it with many different trade offs. It is also time consuming and tedious. The various tools like you mention are best at adding even more dependencies, but are hurdles for the very first one.

Not true. The more external dependencies you add, the more likely it is that one of them will break. I try to have as few external dependencies as possible, and to pick dependencies that are robust and reliably maintained. There is so much Python code on GitHub that is just broken out of the box. When people try your software and it fails to install because your nth dependency is broken or won't build on their system…

They're typically broken out of the box because they don't pin their dependencies. pip-tools[1] or pipenv[2], and tox[3] if it's a lib, should be considered bare minimum necessities - if a project isn't using them, consider abandoning it ASAP, since apparently they don't know what they're doing and haven't paid attention to the ecosystem for years.

[1] https://github.com/jazzband/pip-tools [2] https://docs.pipenv.org/en/latest/ [3] https://tox.readthedocs.io/en/latest/

Re: “Python's batteries are leaking”

#202

The story of Python 2 to Python 3 migration, in a nutshell: > Van Rossum argued instead that if the Twisted team wants the ecosystem to evolve, they should stop supporting older Python versions and force users to upgrade. Brown acknowledged this point, but said half of Twisted users are still on Python 2 and it is difficult to abandon them. The debate at this point became personal for Van Rossum, and he left angrily.

Hopefully the “python foundation” will declare python 2 deprecated soon so that it can be handed over to responsible maintainers.

That's happening: https://pythonclock.org/

To ensure things move along: pip has been printing highly-visible "python 2.7 will deprecate soon" warnings for a couple months or so now.

Re: “Python's batteries are leaking”

#203

I like python, its a nice simple language that you can use to pump out a proof of concept real quick with little hassle, but for full on production I avoid it. But I think this is a larger trend in programming, in my opinion the majority of programmers are super lazy. Everyone is in a mad dash to get the cool new thing out so they just slap a bunch of dependencies on it and damn the consequences of developer debt dow…

I think there’s another common reason to ship the buggy mvp: you launch, get promoted, and find a new job. All the glory and none of the maintenance.

I may have had to clean up in the aftermath a couple of times.

Re: “Python's batteries are leaking”

#204

The story of Python 2 to Python 3 migration, in a nutshell: > Van Rossum argued instead that if the Twisted team wants the ecosystem to evolve, they should stop supporting older Python versions and force users to upgrade. Brown acknowledged this point, but said half of Twisted users are still on Python 2 and it is difficult to abandon them. The debate at this point became personal for Van Rossum, and he left angrily.

Hopefully the “python foundation” will declare python 2 deprecated soon so that it can be handed over to responsible maintainers.

I don't understand the lowercase letters and scare quotes around python foundation. Is that not its name? (Okay, it's Python Software Foundation.)

The end of life date is already set: January 1, 2020.

It's open source so I don't know what you're looking for in terms of a formal handover. Yes, I bet Red Hat and others will continue to maintain their own versions past that date.

Re: “Python's batteries are leaking”

#205

> Brown called out the XML parser and tkinter in particular for making the standard library larger and harder to build, burdening all programmers for the sake of a few Tkinter needs to go...There is very little reason except for the legacy ones, why it needs to be there still...

I love Tkinter, but I could accept letting it be an installable package rather than built-in. I can certainly see its size and complexity being a burden on smaller installations. I think making "pip install tkinter" be bulletproof would go a long way. You're not going to start using Tkinter unless you're reading a tutorial anyway.

There's always going to be a good debate about which batteries should be included. I'd almost put numpy ahead of Tkinter, but maybe that reflects my bias for scientific programming.

Re: “Python's batteries are leaking”

#206
post #169

Earlier quoted context omitted.

> Does anyone have a curated version of PyPI? Pypi have thrown out the downloads counter—a huge misservice to coders. Like I got all day to figure out the best libs for ten different features which I only need in passing, so my primary concern is to not pick complete garbage. So, my solution to that now is to look up Github pages for the libs and choose the one with most stars. As much as I dislike Github for its occ…

Pypi still has a download counter, but it will tend to reflect which libraries are used in ci, so it's a biased estimate.

Could you please point me to the location of that counter? Because I ain't seeing it anywhere.

Re: “Python's batteries are leaking”

#207

Note that similar issues were raised with Ruby stdlib, which is being addressed in part with “Gemification” of stdlib, so that all of stdlib (targeted for 3.0, though it's been going on since 2.4)[0] is being moved out to externally-updatable packages that are included by default (default and bundled gems), so that it is still “batteries included” but the batteries are at least replaceable. Amber's suggestion seems t…

Python cannot be atomized effectively, and the issue is political.

The problem is that I cannot count on being able to install new software in many environments.

If I fight the battle to get centralized IT to install Python, I now have a guaranteed set of standard libraries as well. I'm never going to get permission to install anything other than default. Ever.

Consequently, the standard libraries need to be very complete and very useful.

And, while people seem to love the Rust approach to libraries, I'm not necessarily a fan. Far too many times I have pulled a library that is "obviously" something that a language should consider to be "standard library" and gotten bitten because it was broken. Only VERY core libraries in Rust are guaranteed to work across multiple architectures and OS's.

I think Rust is probably doing the right thing for Rust as "batteries included" is NOT one of its tenets. However, that doesn't make it right for everybody else.

Re: “Python's batteries are leaking”

#208
post #206

Earlier quoted context omitted.

Pypi still has a download counter, but it will tend to reflect which libraries are used in ci, so it's a biased estimate.

Could you please point me to the location of that counter? Because I ain't seeing it anywhere.

afaik it's not in the UI, but the dataset is published and and access provided by other sites: https://pypistats.org/

Re: “Python's batteries are leaking”

#209
post #156
post #60

Earlier quoted context omitted.

The idea of "distros" for python is interesting, and to a certain extent has already happened: just look at Anaconda. I've been using built-in environment isolation tools such as virtualenv for ages but have recently switched over to using miniconda for all things python. Among other things it has amazing support across all three major OS's, and I happen to be dealing with all three at any given time. Whether one use…

As a non-scientific user of pyenv[0], would I benefit from switching to Anaconda/miniconda? [0]: https://github.com/pyenv/pyenv

You don’t have to switch. You can install anaconda using pyenv, to get the best of both worlds.

Re: “Python's batteries are leaking”

#210
post #169

Earlier quoted context omitted.

> Does anyone have a curated version of PyPI? Pypi have thrown out the downloads counter—a huge misservice to coders. Like I got all day to figure out the best libs for ten different features which I only need in passing, so my primary concern is to not pick complete garbage. So, my solution to that now is to look up Github pages for the libs and choose the one with most stars. As much as I dislike Github for its occ…

Pypi still has a download counter, but it will tend to reflect which libraries are used in ci, so it's a biased estimate.

If only there were a way to filter machines on the internet by some kind of id number, and to subtract numbers from other numbers at scale.
Post reply on HN