Berker Peksag <berker.pek...@gmail.com> added the comment: The problem with adding a port_validation argument is that the port attribute is not the only thing that is computed lazily. There is also hostname, username, password attributes etc.
I think the best way would be introducing a new API with more strict parsing rules. For example: from urllib.parse URL url = URL('http://Server=sde; Service=sde:oracle').parse() would raise a ValueError earlier than urlparse() and return a immutable namedtuple. Such an API can be designed as a standalone module first and then can be added into the existing urllib.parse module. I'd personally happy to review and discuss such a modern and user friendly API in the standard library. I think Eric has explained the current situation perfectly and we can now close this issue. We can create a new issue or a new python-ideas thread when or if we have a prototype of a new API. Thank you, everyone! ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33034> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com