[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 sentimen

[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 Re