[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread Chihiro Ito


Chihiro Ito  added the comment:

I have confirmed that all of my app's test cases have passed.

What I've done:
1. Installed Python 3.7.3.
2. Replaced urllib/parse.py with the one from 781ffb1.
3. Ran my app's test cases.

Thank you for the quick fix!

--

___
Python tracker 
<https://bugs.python.org/issue36742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-27 Thread Chihiro Ito

New submission from Chihiro Ito :

urllib.parse.urlsplit raises an exception for an url including a non-ascii 
hostname in NFKD form and a port number.

example:
>>> urlsplit('http://\u30d5\u309a:80')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/ito/.maltybrew/deen/lib/python3.7/urllib/parse.py", line 437, in 
urlsplit
_checknetloc(netloc)
  File "/Users/ito/.maltybrew/deen/lib/python3.7/urllib/parse.py", line 407, in 
_checknetloc
"characters under NFKC normalization")
ValueError: netloc 'プ:80' contains invalid characters under NFKC normalization
>>> urlsplit('http://\u30d5\u309a')
SplitResult(scheme='http', netloc='プ', path='', query='', fragment='')
>>> urlsplit(unicodedata.normalize('NFKC', 'http://\u30d5\u309a:80'))
SplitResult(scheme='http', netloc='プ:80', path='', query='', fragment='')

I believe this behavior was introduced at Python 3.7.3. Python 3.7.2 doesn't 
raise any exception for these lines.

--
components: Unicode
messages: 340983
nosy: ezio.melotti, hokousya, vstinner
priority: normal
severity: normal
status: open
title: urlsplit doesn't accept a NFKD hostname with a port number
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue36742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-27 Thread Chihiro Ito


Change by Chihiro Ito :


--
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue36742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com