4 ms·
Hawk Owl is a _fantastic_ dev. She was the main force behind the twisted 2->3 transition. But because she is, she is missing the point of batteries included. A
by sametmax 7y ago
Hawk Owl is a _fantastic_ dev. She was the main force behind the twisted 2->3 transition. But because she is, she is missing the point of batteries included.
Asyncio is in the stdlib so that we have an official lib and API. The main benefit is that most people now, when looking for async, are not wondering about twisted or gevent or tornado. Most just go asyncio. Most dev efforts go to asyncio. It's the end of the great async war. Is it perfect ? No. And I don't care. It's one thing less to worry about. For those who know what they are doing, you can still choose and pip install twisted, but most people don't, and that's solved. Before that, just choosing the lib was a nighmare, as basically it's a definitive call. Out it on pypi, even with a "stdlib" tag, we go back to the 200X era. And it was not fun.
And the goal for having things like xml/sqlite/ssl without installing anything makes python very useful in a load of situations where you can't install stuff. Sometime you are offline. Sometime you are in a restricted env. Sometime you are not on your machine. Sometime your security protocol is hell. Don't assume people use Python as we do, from our comfortable dev laptop driven by the knowledge of our craft. Python is used in banks, by scientists, in schools, by kids, by poor people in the third world, by geographers and pentesters. The python user base is incredibly diverse, it's why it's so popular: it fits a lot of use cases.
So I see the benefit of having a side version of official modules we can pip install that can move faster. I see the benefit of cleaning the stdlib of old stuff, like the wave module, Template or @static.
But I'm glad I don't have anything to install to generate a uuid or unzip stuff. I'm glad I don't have to worry about twisted anymore (depiste that I did write a book on the topic !).
Also, pip install is NOT simple when you learn the language. I have to spend some time in the classroom, even with adult professionals, to explain the various subtleties of site-packages, import path, py -x on windows, python-pip on linux, -m, virtualenv, header files, etc. before my students become autonomous with it. Without a teachers, this turn into months of bad practices and frustrations.
You'd have to fix that first, way, way before moving stuff to pypi. I do think it should be high priority actually: it affects way more than pip.
- 1_player 7y agoHaving a huge standard library also kills analysis paralysis and lets people be more productive. If you're in the flow and trying to hack together something, the last thing you need is to lose all momentum to pick a date time library. I've had this issue tons of times with Node and Rust, where I'm not up to date with the current meta and my 30 minute hack job is interrupted 5 minutes in by having to google which library should I use to do an HTTP request. (I've actually lost interest in whatever I was doing a few times because of this.) Python's stdlib is nobody's favourite, but when you start to get to its limits, you're probably past your flow state, you've written most of the logic and you can spend some time to replace http.client with requests because the latter is much better. On a tangent note, I've been trying to find another scripting language to replace Python because I'm not a fan of it anymore (I won't get into it right now), and considering what I just wrote, there's not much that can replace it, as most languages have a bare-bones standard library and if you're not up to date with the current best library to do X, you'll never achieve great productivity.
- agumonkey 7y agoI think go did this well, they provide a very solid toolset that is nothing fancy but you can forget about it right away and start producing solutions.
- sametmax 7y agoGive it 25 years.
- Kwpolska 7y agoYou still need to learn to use the library you picked, even if it’s part of stdlib. Python has two HTTP libraries in stdlib, http.client and urllib.request. The former is low-level, and the latter has a fairly complicated API. Learning to use them will take much longer than just giving in and picking Requests. The stdlib docs will tell you to use Requests. Everyone on the Internet will tell you to use Requests. Any questions you might have for http.client/urllib.request will be answered by “use Requests”.
- gray_-_wolf 7y ago> I've been trying to find another scripting language to replace Python because I'm not a fan of it anymore (I won't get into it right now), and considering what I just wrote, there's not much that can replace it Have you considered ruby?
- lsak1201 7y ago> Asyncio is in the stdlib so that we have an official lib and API. It was pitched first as a common low level async loop for other applications like Twisted and Tornado. Then people started using it directly and the keywords were added. It's great for the people who think the way asyncio does, others are now forced to use it. I find all of Twisted, Go and Jane Street's Async easier to use. Perhaps Python is just the wrong language for me.
- guggle 7y ago> I see the benefit of cleaning the stdlib of old stuff, like the wave module Wait... what ? No way ! Some of us do you use Python to process wav files. If anything, I'd like this module to be updated, not removed.
- pas 7y agoNon maintained modules should be split off and put on PyPI with a big warning, of course.
- dtech 7y agoThe argument is not that this module should be removed, it's that it too niche to be included in every python installation by default and should be installed through a package manager or similar.
- SlowRobotAhead 7y ago>She was the main force behind the twisted 2->3 transition. Explain? I’ve hated the slow adoption of 3.x from 2.x, and generally how terrible it is to have apps that are 2.x on your 3.x system, and would like to know more about how that happened.
- sametmax 7y agoTwisted is a lib, she happened to have contributed a lot to the migration effort for it.