classification
Title: Missing encoding parameter in urllib/parse.py
Type: crash Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: urllib.parse.parse_qsl does not handle unicode data properly
View: 30483
Assigned To: Nosy List: jmbc
Priority: normal Keywords:

Created on 2017-11-25 11:48 by jmbc, last changed 2018-05-29 12:32 by cheryl.sabella. This issue is now closed.

Messages (2)
msg306953 - (view) Author: Jean-Michel (jmbc) Date: 2017-11-25 11:48
Here is the patch, working for me in Python 3.4.2
610,611c703
<             #~ value = _coerce_result(value)
<             value = _coerce_result(value,encoding=encoding)
---
>             value = _coerce_result(value)
msg306954 - (view) Author: Jean-Michel (jmbc) Date: 2017-11-25 11:52
Sorry, the description was missing.

parse.py crashes if provided with unicode data like "voilà" :

[wsgi:error] [pid 20335] [client 127.0.0.1:44658] UnicodeEncodeError: 'ascii' codec can't encode character '\\xe0' in position 314: ordinal not in range(128)

The "encoding" parameters looks missing in parse.py, so I included it.
History
Date User Action Args
2018-05-29 12:32:20cheryl.sabellasetstatus: open -> closed
superseder: urllib.parse.parse_qsl does not handle unicode data properly
resolution: duplicate
stage: resolved
2017-11-25 11:52:49jmbcsetmessages: + msg306954
2017-11-25 11:48:22jmbccreate