Bug 1158890

Summary: Cannot import urllib2
Product: [Fedora] Fedora Reporter: Matěj Cepl <mcepl>
Component: jythonAssignee: Mat Booth <mat.booth>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akurtako, dmalcolm, jmatthew, lkundrak, mcepl, pmackinn, tradej
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jython-2.7-0.2.b3.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-12 02:39:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matěj Cepl 2014-10-30 13:03:55 UTC
Description of problem:
matej@wycliff: test (master)$ jython
Jython 2.7b3+ (, Jul 31 2014, 15:44:51) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.8.0_25
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib2 import Request, OpenerDirector
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/share/jython/Lib/urllib2.py", line 94, in <module>
    import httplib
  File "/usr/share/jython/Lib/httplib.py", line 71, in <module>
    import socket
  File "/usr/share/jython/Lib/socket.py", line 3, in <module>
    from _socket import (
  File "/usr/share/jython/Lib/_socket.py", line 2, in <module>
    import encodings.idna
  File "/usr/share/jython/Lib/encodings/idna.py", line 9, in <module>
    from com.ibm.icu.text import StringPrep, StringPrepParseException
ImportError: No module named ibm
>>>

Version-Release number of selected component (if applicable):
jython-2.7-0.1.b3.fc21.noarch

Comment 1 Alexander Kurtakov 2014-10-30 16:13:34 UTC
Mat, would you please verify that the launcher script is putting icu4j on the classpath? This is my guess about what the problem is.

Comment 2 Matěj Cepl 2014-10-31 11:18:30 UTC
I am not sure about that, and I haven't finished with the analysis, but it seems to me that we are missing also jarjar.

Also, people on #jython channel on Freenode scolded us, that we are building the development jar (the bug wouldn't show up apparently on normal jar).

Comment 3 Mat Booth 2014-10-31 11:28:16 UTC
I wonder how open upstream would be to adopting maven...

Comment 4 Fedora Update System 2014-11-03 15:37:49 UTC
jython-2.7-0.2.b3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/jython-2.7-0.2.b3.fc21

Comment 5 Fedora Update System 2014-11-03 19:39:55 UTC
Package jython-2.7-0.2.b3.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing jython-2.7-0.2.b3.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14196/jython-2.7-0.2.b3.fc21
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-11-12 02:39:16 UTC
jython-2.7-0.2.b3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.