Earlier quoted context omitted.
This is an argument for good package management. There’s no way around it. You can’t add everything anyone could ever hypothetically need into the standard library, just because Pip is rubbish. (I mean, I don’t care. I use Rust. I’m just arguing on behalf of the poor people who are still abused by their employers, or wacky enough to voluntarily choose to use Python.)
I use Rust and Python, and I don't believe that Rust's strategies regarding standard libraries are great either. And let's not talk about Javascript "in order to use CSS with Webpack you need to download this 20 line package with its own release cycle"-style noncense. I do believe that package management solutions are needed. But I also think that a big standard library is A Good Thing, especially in a universe where…
Python finally offloads some batteries
31–40 of 67 posts
Re: Python finally offloads some batteries
#32Put everything in the standard library, or nothing at all, it doesn't really matter. Either way you still have to set up a custom environment and install a bunch of extra stuff and learn "how to run Python programs".
Re: Python finally offloads some batteries
#33Re: Python finally offloads some batteries
#34What are you supposed to use instead of urllib? Seems like an oversight to write all about how you considered removing it without saying whether there is a replacement.
https://lwn.net/ml/python-dev/CABqyc3wGDmdnDjrhYh0SxT_Tgr5M8...
From: Victor Stinner
To: Python Dev
Subject: [Python-Dev] It's now time to deprecate the stdlib urllib module
Date: Sun, 06 Feb 2022 15:08:40 +0100
Message-ID:
Hi,
I propose to deprecate the urllib module in Python 3.11. It would emit
a DeprecationWarning which warn users, so users should consider better
alternatives like urllib3 or httpx: well known modules, better
maintained, more secure, support HTTP/2 (httpx), etc.Re: Python finally offloads some batteries
#35It’s interesting to see which modules were set for deprecation but ended up being un-deprecated (de-deprecated?): colorsys fileinput getopt optparse wave https://peps.python.org/pep-0594/#modules-to-keep Seems like the maintainers have been generous in deciding which batteries are not dead yet.
i mostly agree with those choices. colorsys: a small handful of conversion functions you need every now and then fileinput: quick and dirty boilerplate for when you want to accept input from files or stdin getopt: a fine, well understood command line parser optparse: it's a simpler more broken argparse that will eventually tell you "i'm sorry dave..." and people should stop using it wave: great way to create or proce…
[1] - https://github.com/python/cpython/blob/main/Lib/argparse.py
Re: Python finally offloads some batteries
#36What are you supposed to use instead of urllib? Seems like an oversight to write all about how you considered removing it without saying whether there is a replacement.
Re: Python finally offloads some batteries
#37Cgi is still the simplest way to get a basic web script running, without worrying about lingering state between page hits, etc. Doesn't Linus always shut down such discussions regarding the Linux kernel with "we don't break userspace"? Python should learn something from that.
Re: Python finally offloads some batteries
#38Does anyone actually have normal users run Python programs? I thought programming was intended so that users could run your programs. But if a regular non-programming user wants to use a Python program, they need a whole tutorial on how to install and run it. Put everything in the standard library, or nothing at all, it doesn't really matter. Either way you still have to set up a custom environment and install a bunc…
But to answer your question, yes, millions of people run Python programs without ever knowing anything about Python.
Re: Python finally offloads some batteries
#39This is stupid. I use cgi all the time. My cheap Hetzner single core vps can fork a Linux process 10k times a second, so I don't want to hear about forking being too slow until Django can serve pages that fast. Cgi is still the simplest way to get a basic web script running, without worrying about lingering state between page hits, etc. Doesn't Linus always shut down such discussions regarding the Linux kernel with "…
Here’s an example for those interested: https://dzone.com/articles/python-simple-http-server-with-cg...