News for hackers. Stuff that matters.
Re:“Python's batteries are leaking” by stochastastic on Saturday May 18, 2019 @04:42PM (#19949614)
The Python standard library has been a huge help for me. Evaluating which third party packages to trust and handling updates is a hassle. (Would love a solution for this. Does anyone have a curated version of PyPI?) I’m surprised that people want to slim it down other than for performance on a more constrained system.

As an aside, why doesn’t the Python standard library extend/replace features with code from successful packages like Requests? Tried it and it didn’t work? Too much bloat? Already got too much on the to-do list?

Re:“Python's batteries are leaking” by debatem1 on Saturday May 18, 2019 @06:21PM (#19950046)
The quote about the stdlib being "where packages go to die" was, for a long time, considered a feature and not a bug. The theory was that once a package is in the stdlib its development should slow to prioritize stability over new features.

This may somewhat explain why lots of successful packages are not in the stdlib: putting them in effectively killed future development until a few years ago. But today that argument is inconsistently applied and I'm not sure if it's a rule worth keeping.

Re:“Python's batteries are leaking” by sitkack on Saturday May 18, 2019 @06:38PM (#19950111)
That phrase never had a good connotation. I believe someone skilled in PR respun that meaning.
Re:“Python's batteries are leaking” by aasasd on Saturday May 18, 2019 @07:16PM (#19950259)
> 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 occasional typical proprietary behavior, Gitlab doesn't help in this case.

Re:“Python's batteries are leaking” by j88439h84 on Saturday May 18, 2019 @08:18PM (#19950523)
Pypi still has a download counter, but it will tend to reflect which libraries are used in ci, so it's a biased estimate.
Re:“Python's batteries are leaking” by jancsika on Saturday May 18, 2019 @09:07PM (#19950724)
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.
Re:“Python's batteries are leaking” by orf on Wednesday May 22, 2019 @07:35PM (#19986761)
And what about caches and proxies?
Re:“Python's batteries are leaking” by aasasd on Saturday May 18, 2019 @08:55PM (#19950679)
Could you please point me to the location of that counter? Because I ain't seeing it anywhere.
Re:“Python's batteries are leaking” by detaro on Saturday May 18, 2019 @08:57PM (#19950695)
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” by petre on Sunday May 19, 2019 @12:00AM (#19951356)
Perl has stars on MetaCPAN and every version has a test counter. Download counter is unreliable.
Re:“Python's batteries are leaking” by DonHopkins on Sunday May 19, 2019 @08:23AM (#19952966)
Especially download counters for libraries that make http requests!
Re:“Python's batteries are leaking” by simonh on Saturday May 18, 2019 @07:27PM (#19950304)
Requests depends on urllib3 which would also have to go into the stdlib. It also contains a CA bundle which the core devs don’t want to do. It also likely the internal implementation doesn’t follow core dev standards and practices, a common problem with integrating external libs. Finally there’s a risk it would slow or discourage new feature development by tying it to the core release cycle.

A better approach might be to add a core of basic requests-like features built from the stdlib’s existing resources. That would be beneficial to many users and if they need more then there’s always Requests.

Re:“Python's batteries are leaking” by stochastastic on Saturday May 18, 2019 @07:58PM (#19950449)
That makes sense; if it makes any difference I don’t necessarily mean “take code from X and drop it in” so much as “if the consensus appears to be that the X api is better then add that to stdlib”. I like that notion of adding the X api, or parts thereof, And then having a third party X+ package. Maybe I just like the idea of something I built being “worthy” of stdlib.
Re:“Python's batteries are leaking” by jonnycomputer on Saturday May 18, 2019 @05:49PM (#19949915)
I've come to use packages outside of the standard library very sparingly; been burned too many times to find that development of some package stopped or slowed down and backing out can be a real pita.
Re:“Python's batteries are leaking” by falcor84 on Saturday May 18, 2019 @06:34PM (#19950094)
What is your argument here? Standard library module development is also extremely slow.
Re:“Python's batteries are leaking” by kilburn on Saturday May 18, 2019 @07:59PM (#19950453)
There is one major difference: an abandoned external package may break with newer python versions, whereas you can always count on stdlib packages being updated for new versions.
Re:“Python's batteries are leaking” by falcor84 on Sunday May 19, 2019 @11:09AM (#19953657)
Can you provide an example?

To the best of my knowledge, minor version updates in Python 3 have been entirely backwards so far and shouldn't have broken any library code. And as for incompatible changes sick as the transition to 3, then these of course had interface changes in the standard library.

Re:“Python's batteries are leaking” by jonnycomputer on Saturday May 18, 2019 @08:13PM (#19950505)
exactly. and i'm in academic software. its even worse.
Re:“Python's batteries are leaking” by chestervonwinch on Saturday May 18, 2019 @08:15PM (#19950511)
> Does anyone have a curated version of PyPI?

I'm not entirely sure what you're looking for, but have you tried https://www.enthought.com/product/enthought-deployment-manag... ?

Edit: example

    $ edm envs create tester36 --version 3.6
    $ edm shell -e tester36
    (tester36) $ edm install ipython matplotlib pyqt
Re:“Python's batteries are leaking” by stochastastic on Saturday May 18, 2019 @10:21PM (#19951021)
That’s interesting. Thanks!
Re:“Python's batteries are leaking” by llukas on Saturday May 18, 2019 @05:05PM (#19949713)
+100

> As an aside, why doesn’t the Python standard library extend/replace features with code from successful packages like Requests?

It is possible (ie. asyncio was separate package). It is slow process though.

Re:“Python's batteries are leaking” by misterdoubt on Saturday May 18, 2019 @11:04PM (#19951184)
I'd bet that absorbing Requests into the standard library, no matter the particular method of absorption proposed, would present too much of a political challenge to overcome.
Re:“Python's batteries are leaking” by quietbritishjim on Saturday May 18, 2019 @05:54PM (#19949942)
pathlib is another example.
Re:“Python's batteries are leaking” by misterdoubt on Saturday May 18, 2019 @11:02PM (#19951179)
Curating packages for quality across multiple versions and architectures is hard work. In addition to Enthought (mentioned earlier), Anaconda maintains a curated set.
Re:“Python's batteries are leaking” by lukka5 on Saturday May 25, 2019 @06:50PM (#20011987)
> Does anyone have a curated version of PyPI?

https://python.libhunt.com/ Not exactly curation but it does have rated libs for lots of categories.

Re:“Python's batteries are leaking” by pdonis on Saturday May 18, 2019 @05:56PM (#19949950)
> Already got too much on the to-do list?

That would be my guess. I would also add that getting through the process of adding a third-party set of modules to the standard library can take quite a while.