Issue 22244: load_verify_locations fails to handle unicode paths on Python 2 (original ) (raw )Created on 2014-08-21 20:46 by alex , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Messages (8)
msg225614 - (view)
Author: Alex Gaynor (alex) *
Date: 2014-08-21 20:46
Details of the issue are here: http://bugs.python.org/msg225613 I'm not sure what the correct API to use is there, perhaps the encoding can be folded into the PyArg_ParseTupleAndKeywords() call.
msg225700 - (view)
Author: Alex Gaynor (alex) *
Date: 2014-08-22 19:48
Attached patch resolves the issue, includes a test.
msg225727 - (view)
Author: Benjamin Peterson (benjamin.peterson) *
Date: 2014-08-23 04:17
Can't you just use "et" in PyArg_Parse?
msg225728 - (view)
Author: Alex Gaynor (alex) *
Date: 2014-08-23 04:21
Unfortunately no, the API accepts explicit Nones (in addition to simply not passing the argument), and et errors on those.
msg225729 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2014-08-23 04:24
You could do all the argument conversion in the Python SSLContext class and then delegate to the base _SSLContext class...
msg225730 - (view)
Author: Alex Gaynor (alex) *
Date: 2014-08-23 04:25
It's not clear to me that that's better, and it makes the diff with the Python3 version larger.
msg225731 - (view)
Author: Alex Gaynor (alex) *
Date: 2014-08-23 04:30
Attached patch adds an additional test for a more interesting unicode path.
msg226022 - (view)
Author: Roundup Robot (python-dev)
Date: 2014-08-28 13:33
New changeset 97081a80f487 by Benjamin Peterson in branch '2.7': fix load_verify_locations on unicode paths (closes #22244 ) http://hg.python.org/cpython/rev/97081a80f487
History
Date
User
Action
Args
2022-04-11 14:58:07
admin
set
github: 66440
2014-08-28 13:33:28
python-dev
set
status: open -> closednosy: + python-dev messages: + resolution: fixedstage: resolved
2014-08-23 04:30:30
alex
set
files: + t22244.diff messages: +
2014-08-23 04:25:25
alex
set
messages: +
2014-08-23 04:24:25
pitrou
set
messages: +
2014-08-23 04:21:28
alex
set
messages: +
2014-08-23 04:17:53
benjamin.peterson
set
nosy: + benjamin.peterson messages: +
2014-08-22 19:48:15
alex
set
keywords: + patch , needs review files: + t22244.diff messages: +
2014-08-21 20:46:55
alex
create