Issue1997

classification
Title: Incomplete ssl support in Jython2.7a2
Type: behaviour Severity: major
Components: Core Versions: 2.7a2
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amak Nosy List: amak, makronized, wehart
Priority: Keywords:

Created on 2012-12-15.15:26:14 by wehart, last changed 2013-02-02.10:58:47 by amak.

Messages
msg7546 (view) Author: Bill Hart (wehart) Date: 2012-12-15.15:26:14
Jython 2.7a2 does not appear to correctly implement urllib2.  The following fails:

urllib2.urlopen('https://software.sandia.gov/svn/public/pyutilib/vpy/installer.ini')

with the error:

urllib2.URLError: <urlopen error unknown url type: https>
msg7560 (view) Author: Marco B. (makronized) Date: 2013-01-01.11:07:13
I can confirm this bug. 

I've created a class:

public class Foo
{
    public static void main (String[] args)
    {
        try
        {
            PythonInterpreter.initialize(System.getProperties(), System.getProperties(), new String[0]);
            PythonInterpreter interp = new PythonInterpreter();
            interp.execfile("foo.py");//        
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

My "foo.py" file is calling "oauth2" (that is using HTTPS, of course), and this is the result:

File "foo.py", line 308, in <module>
main(sys.argv)
File "foo.py", line 299, in main
response = AuthorizeTokens("mykey", "mytoken",
File "foo.py", line 208, in AuthorizeTokens
response = urllib.urlopen(request_url, urllib.urlencode(params)).read()
File "C:\jython2.7a2\jython.jar\Lib\urllib.py", line 88, in urlopen
File "C:\jython2.7a2\jython.jar\Lib\urllib.py", line 204, in open
File "C:\jython2.7a2\jython.jar\Lib\urllib.py", line 216, in open_unknown
IOError: [Errno url error] unknown url type: 'https'
msg7606 (view) Author: Alan Kennedy (amak) Date: 2013-02-02.10:58:47
Fix checked in here

http://hg.python.org/jython/rev/fe47bfd36e5c
History
Date User Action Args
2013-02-02 10:58:47amaksetstatus: open -> closed
resolution: fixed
messages: + msg7606
2013-01-01 11:07:13makronizedsetnosy: + makronized
messages: + msg7560
2012-12-22 13:03:04amaksetassignee: amak
nosy: + amak
2012-12-15 15:26:14wehartcreate