4 ms·
> Modules in the standard library are generally favored and seen as the de-facto solution for a problem. A majority of users only pick 3rd party modules to repl
by anoncake 7y ago
> Modules in the standard library are generally favored and seen as the de-facto solution for a problem. A majority of users only pick 3rd party modules to replace a stdlib module, when they have a compelling reason, e.g. lxml instead of xml. The removal of an unmaintained stdlib module increases the chances of a community contributed module to become widely used.
Developers don't have a compelling reason to use 3rd party modules instead of the standard library. Therefore they don't. You consider that a problem and want to encourage them to use 3rd party modules more.
In short, you want developers to use 3rd party libraries because there is no compelling reason to do so?
> A lean and mean standard library benefits platforms with limited resources like devices with just a few hundred kilobyte of storage (e.g. BBC Micro:bit). Python on mobile platforms like BeeWare or WebAssembly (e.g. pyodide) also benefit from reduced download size.
That's a silly reason. Just make a separate distribution with a stripped down standard library.
- hoseja 7y agoThey want to stop supporting the old modules because to keep them in working order is almost useless and uses too much manpower.
- anoncake 7y agoThat's one of three reasons. https://www.python.org/dev/peps/pep-0594/#rationale https://www.python.org/dev/peps/pep-0594/#rationale
- deleted 7y ago[deleted]
- carlmr 7y ago>> A lean and mean standard library benefits platforms with limited resources like devices with just a few hundred kilobyte of storage (e.g. BBC Micro:bit). Python on mobile platforms like BeeWare or WebAssembly (e.g. pyodide) also benefit from reduced download size. >That's a silly reason. Just make a separate distribution with a stripped down standard library. True, you could have a std and core library. I think Rust does this for embedded. IMHO if you take away the large standard lib, except for pandas I have no more reasons to use Python. I don't like the language that much, but the std library is pretty good for scripting when you need something on a target system that only has standard Python.
- int_19h 7y agoTo give a specific example, there's a lot of headache that new Python users could be spared if only they used requests instead of urllib2. But they don't know that it's compelling if they never go look, and just stick to stdlib.
- anoncake 7y agoGood point. However, there's a box saying that request is recommended at the top of the urllib.request docs. https://docs.python.org/3.8/library/urllib.request.html#module-urllib.request https://docs.python.org/3.8/library/urllib.request.html#modu...
- ben509 7y agoUnfortunately, I think people usually search StackOverflow, or just type into Google and get pointed to SO. If they type in "how do I download a web page in python" they get: 1. urllib [1] 2. BeautifulSoup and a comment mentioning requests [2] 3. requests [3] 4. urllib, httplib [4] Which is looking better than I expected... but no information on 2 or 3 relating to how you install those libraries. So 1 and 4 will Just Work. [1]: https://stackoverflow.com/questions/45717889/read-the-text-of-an-web-page-in-python https://stackoverflow.com/questions/45717889/read-the-text-o... [2]: https://stackoverflow.com/questions/26050064/automating-download-of-executable-which-is-within-several-nested-urls-by-listeni https://stackoverflow.com/questions/26050064/automating-down... [3]: https://stackoverflow.com/questions/44553348/how-to-download-from-an-html-link-href-in-python https://stackoverflow.com/questions/44553348/how-to-download... [4]: https://stackoverflow.com/questions/2646288/retrieve-some-info-from-the-web-automatically https://stackoverflow.com/questions/2646288/retrieve-some-in...
- pfranz 7y agoI'd love if something like requests was included along with Python. But requests uses urllib3, so it's not like you could get rid of that. The main page for requests says they're working on a v3...you wouldn't want that kind of churn in the stdlib. Personally, I kind of like the structure of low-level libraries and fancier high-level libraries I use most often. So I'm not quite sure what is the best thing to do. It sounds like requests III is a Python3 forward version. So it might make sense to ship that? Python has decided to include packages developed outside of the stdlib before; I think json, pathlib, and maybe optparse.