Message314139
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:01 | berker.peksag | set | recipients:
+ berker.peksag, eric.smith, bbayles, agnosticdev, jonathan-lp |
2018-03-20 13:00:01 | berker.peksag | set | messageid: <1521550801.49.0.467229070634.issue33034@psf.upfronthosting.co.za> |
2018-03-20 13:00:01 | berker.peksag | link | issue33034 messages |
2018-03-20 13:00:01 | berker.peksag | create | |
|