Bug 785301 - build python3 subpackage
build python3 subpackage
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-tornado (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ionuț Arțăriși
Fedora Extras Quality Assurance
:
: 907689 (view as bug list)
Depends On:
Blocks: 784947
  Show dependency treegraph
 
Reported: 2012-01-27 17:05 EST by Thomas Spura
Modified: 2013-02-05 03:58 EST (History)
3 users (show)

See Also:
Fixed In Version: python-tornado-2.2-1.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-17 18:48:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
add python3 subpackage (3.86 KB, patch)
2012-01-27 17:05 EST, Thomas Spura
no flags Details | Diff
fix python3 dependency issue (1.01 KB, patch)
2012-02-06 18:07 EST, Pádraig Brady
no flags Details | Diff

  None (edit)
Description Thomas Spura 2012-01-27 17:05:45 EST
Created attachment 557964 [details]
add python3 subpackage

Description of problem:
We are trying to get python3-ipython into fedora, so we need python3-tornado first.

So could you please add a subpackage for that?
The attached patch does it, but note:
* one test is currently failing.
* python3-pycurl is needed for this to work, but upstream looks dead...

Will further test the python3-tornado package, when the rest of the python3-ipython is here, so it works completely...

What do you think?
Should we try the python3-tornado even without having pycurl?
Seems to work, except for one testcase...
Comment 1 Ionuț Arțăriși 2012-02-06 09:47:39 EST
Hi, Thomas!

Thanks a lot for the patch. I have added two more BuildRequires for python3-setuptools and python-tools and removed the BuildRequires for python3-pycurl and python3-simplejson. 

From tornadoweb.org:

On Python 2.6 and 2.7, there are no dependencies outside the Python standard library, although PycURL (version 7.18.2 or higher required; version 7.21.1 or higher recommended) may be used if desired.
On Python 3.2, the distribute package is required. Note that Python 3 support is relatively new and may have bugs.

I think I would like to remove the Requires for python-simplejson too. 

Do you need this package for EPEL as well? 5 or 6?

I don't get any failed unittests however. How do you get that failed testcase?
Comment 2 Thomas Spura 2012-02-06 16:24:00 EST
(In reply to comment #1)
> I don't get any failed unittests however. How do you get that failed testcase?

Great, thanks for the build!

F16 would be great, but EPEL doesn't matter as there is no python3 (yet?!).
I think, EPEL7 is the first with python3.

Hmm, seems to only be the case when running with rpmbuild, doesn't work with proper mock:
ERROR:root:Uncaught exception GET /robots.txt (127.0.0.1)
HTTPRequest(protocol='http', host='localhost:10085', method='GET', uri='/robots.txt', version='HTTP/1.1', remote_ip='127.0.0.1', body='', headers={'Host': 'localhost:10085', 'Accept-Encoding': 'gzip'})
Traceback (most recent call last):
  File "tornado/web.py", line 953, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "tornado/web.py", line 1460, in get
    mime_type, encoding = mimetypes.guess_type(abspath)
  File "/usr/lib64/python3.2/mimetypes.py", line 286, in guess_type
    init()
  File "/usr/lib64/python3.2/mimetypes.py", line 351, in init
    db.read(file)
  File "/usr/lib64/python3.2/mimetypes.py", line 203, in read
    self.readfp(fp, strict)
  File "/usr/lib64/python3.2/mimetypes.py", line 214, in readfp
    line = fp.readline()
  File "/usr/lib64/python3.2/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1362: ordinal not in range(128)
ERROR:root:500 GET /robots.txt (127.0.0.1) 9.81ms
Comment 3 Pádraig Brady 2012-02-06 18:07:56 EST
Created attachment 559787 [details]
fix python3 dependency issue

The latest package has just broken my build.

When trying to install tornado in mock, we get:

DEBUG util.py:257:  Error: Package: python-tornado-2.1.1-3.fc17.noarch (build)
DEBUG util.py:257:             Requires: python3-simplejson

I think something like the attached is needed?
Comment 4 Ionuț Arțăriși 2012-02-07 03:47:03 EST
That error is wrong.

python3-simplejson is not needed for tornado running on python3. The only file in which simplejson is imported is tornado/escape.py and there it's imported only when json is not available (this never happens for python3). You can check out the source here:

https://github.com/facebook/tornado/blob/master/tornado/escape.py#L39

The 'try' block will work on python3 and execution will never reach "import simplejson".
Comment 5 Fedora Update System 2012-02-09 08:26:31 EST
python-tornado-2.2-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/python-tornado-2.2-1.fc16
Comment 6 Ionuț Arțăriși 2012-02-09 08:29:04 EST
So to go back on my previous comment. I misread the patch, only saw the second part. The first part was right: python3-simplejson is not a Requires. Thanks! 

So this update should fix the problem for you guys?
Comment 7 Thomas Spura 2012-02-09 09:02:48 EST
(In reply to comment #6)
> So this update should fix the problem for you guys?

I think so.

Other dependencies of ipython isn't yet ready with python3, so the big test is still to come :)

Will open new bugs/report back when there are issues.

Thanks for taking care of this.
Comment 8 Pádraig Brady 2012-02-09 09:15:43 EST
I just kicked of another build on koji, and python-tornado-2.2-1.fc17.noarch was selected, so I suspect my issue is now fixed.

Koji is failing now with timeouts, but that a separate issue.
Comment 9 Fedora Update System 2012-02-09 19:54:17 EST
Package python-tornado-2.2-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-tornado-2.2-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1492/python-tornado-2.2-1.fc16
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2012-02-17 18:48:54 EST
python-tornado-2.2-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Thomas Spura 2013-02-05 03:58:50 EST
*** Bug 907689 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.