Martin Panter added the comment:

Nothing has been fixed; I don’t see any evidence that this is “out of date”. 
Here is a more complete test:

import urllib.request
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor())
urllib.request.install_opener(opener)
request = 'https://httpbin.org/cookies/set?name=value'
# Download certifiate chain for https://httpbin.org/ into cacert.pem (I used 
Firefox)
sock = urllib.request.urlopen(request, cafile = 'cacert.pem')
sock.read()  # b'{\n  "cookies": {}\n}\n' (No cookies!)
sock.close()
sock = urllib.request.urlopen(request)  # Default SSL settings
sock.read()  # b'{\n  "cookies": {\n    "name": "value"\n  }\n}\n'

I’m not comfortable with applying a patch that “doesn’t mangle [the global 
state] too much”. Anyway, this is the same as Issue 18543, which has slightly 
more recent discussion.

----------
nosy: +martin.panter
resolution: out of date -> duplicate
status: pending -> closed
superseder:  -> urllib.parse.urlopen shouldn't ignore installed opener when 
called with any SSL argument

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15769>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to