Author berker.peksag
Recipients agnosticdev, bbayles, berker.peksag, eric.smith, jonathan-lp
Date 2018-03-20.13:00:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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!
Date User Action Args
2018-03-20 13:00:01berker.peksagsetrecipients: + berker.peksag, eric.smith, bbayles, agnosticdev, jonathan-lp
2018-03-20 13:00:01berker.peksagsetmessageid: <>
2018-03-20 13:00:01berker.peksaglinkissue33034 messages
2018-03-20 13:00:01berker.peksagcreate