On Sun, Feb 6, 2022 at 3:35 PM Paul Moore <p.f.mo...@gmail.com> wrote:
> urllib.request may not be "best practice", but it's still extremely
> useful for simple situations, and urllib.parse is useful for basic
> handling of URLs.Yes, the more complex aspects of urllib are better
> handled by external packages, but that's not sufficient argument for
> removing the package altogether. There are many situations where
> external dependencies are unsuitable. Also, there's quite a lot of
> usage of urllib in the stdlib itself - how would you propose to
> replace that?
> (...)
> In addition, pip relies pretty heavily on urllib (parse and request),
> and pip has a bootstrapping issue, so using 3rd party libraries is
> non-trivial.

If a project like urllib3 uses it, urllib can be copied there and its
maintenance will continue there. Or maybe the maintenance can be moved
into a new project on PyPI like "legacy_urllib".

It's situation similar to the distutils deprecation: setuptools
decided to include a hidden copy of the distutils in its source, and
the distutils maintenance moved there. IMO it's a great move.
setuptools is a better place than Python to maintain this code:
setuptools release cycle is faster and is related to pip. Python
release cycle is slow and the distutils API was too big. Since the
distutils API is now hidden, setuptools can freely drop code and
changing APIs without affecting the public setuptools API.

I'm well aware that moving distutils into setuptools caused troubles.
IMO it is worth it and we have to go trough these issues once for a
better maintenance burden in the long term.


> In any case, why is this being proposed as a simple posting on
> python-dev? There's already PEP 594 for removals from the stdlib.

urllib is bigger than modules proposed for deprecation in PEP 594.
Also, I expect that deprecating urllib is more controversial.

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/UR6BT5S2S4WGEI62MRWHCRAPZNTQXTVT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to