Issue2481

classification
Title: Update urllib2.py from 2.7.11
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Milestone: Jython 2.7.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: darjus, yan12125, zyasoft
Priority: urgent Keywords:

Created on 2016-03-03.15:46:09 by yan12125, last changed 2016-09-06.21:23:21 by zyasoft.

Messages
msg10796 (view) Author: (yan12125) Date: 2016-03-03.15:46:08
Current lib-python/2.7/urllib2.py is out-dated. As a result, I can't disable SSL certificate verification in pure Python:

import ssl
import urllib2

context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
req = urllib2.urlopen('https://wrong.host.badssl.com/', context=context)
print(req.read())

Please update it.
msg10797 (view) Author: Jim Baker (zyasoft) Date: 2016-03-03.18:56:36
Looks like a blocker to the RC to me
msg10914 (view) Author: Jim Baker (zyasoft) Date: 2016-08-25.04:20:28
We need to do this update. It looks pretty straightforward. We should also update urllib, along with the corresponding tests test_httplib, test_urllib, test_urllib2 from CPython 2.7 latest, including the recent HTTPoxy fix (highly unlikely to be a problem in Jython however, given how bad CGI performance would be if someone did set that up). There are some minor failures in test_httplib that can be readily skipped or possibly resolved.
msg10936 (view) Author: Jim Baker (zyasoft) Date: 2016-09-05.16:28:53
I'm close to getting this update in - just need to fix a couple more tests that we will defer until 2.7.2 (or possibly later).
msg10939 (view) Author: Jim Baker (zyasoft) Date: 2016-09-06.05:14:25
Fixed as of https://hg.python.org/jython/rev/91083509a11c
msg10942 (view) Author: (yan12125) Date: 2016-09-06.18:19:52
Thanks it's fixed!
History
Date User Action Args
2016-09-06 21:23:21zyasoftsetstatus: pending -> closed
2016-09-06 18:19:52yan12125setmessages: + msg10942
2016-09-06 05:14:25zyasoftsetstatus: open -> pending
resolution: accepted -> fixed
messages: + msg10939
2016-09-05 16:28:53zyasoftsetmessages: + msg10936
2016-08-25 04:20:29zyasoftsetassignee: zyasoft
messages: + msg10914
2016-03-03 18:56:44zyasoftsetpriority: urgent
2016-03-03 18:56:37zyasoftsetnosy: + darjus, zyasoft
resolution: accepted
messages: + msg10797
milestone: Jython 2.7.1
2016-03-03 15:46:09yan12125create