[issue19451] urlparse accepts invalid hostnames

2014-12-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue19451] urlparse accepts invalid hostnames

2013-11-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 3.4 urllib.parse.urlparse doc says "The module has been designed to match the Internet RFC on Relative Uniform Resource Locators. It supports the following URL schemes: ". To me, 'support' means 'accept every valid URL for the particular scheme' but not n

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread R. David Murray
R. David Murray added the comment: Yes, I said that link only dealt with the DNS side of things...where there are also incompatibilities. I don't think that strictly adhering to the URI RFCs would clear things up. What about those domains that have _s and want to run web services on them? It

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread Daniele Sluijters
Daniele Sluijters added the comment: The link you mention only deals with the DNS side of things, this issue is specifically not about that, it's about the URI/URL side of things which is a very important distinction in this case. I'm also not entirely sure I agree with the sentiment of "it's

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread R. David Murray
R. David Murray added the comment: Python often defaults to the practical over the strictly-conforming (unless there is a 'strict' flag :) We generally follow the lead of the browsers in implementing our web related modules. The situation here appears to be a real mess. Here's an interesting

[issue19451] urlparse accepts invalid hostnames

2013-10-30 Thread Daniele Sluijters
New submission from Daniele Sluijters: Python 2's urlparse.urlparse() and Python 3's urllib.parse.urlparse() accept URI/URL's with underscores in the host/domain/subdomain. I believe this behaviour to be incorrect. A distinction needs to be made between DNS names and Uniform Resource Locators