Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524724 - dev-python/webtest-1.4.3-r1 should not remove lint3 for Python3.3
Summary: dev-python/webtest-1.4.3-r1 should not remove lint3 for Python3.3
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-07 20:01 UTC by W. Trevor King
Modified: 2014-12-20 07:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description W. Trevor King 2014-10-07 20:01:40 UTC
The webtest ebuilds (including the latest amd64 dev-python/webtest-1.4.3-r1) have:

        if [[ ${EPYTHON} == python3* ]]; then
                rm -f "${D}$(python_get_sitedir)"/webtest/lint3.py
        fi

which breaks them for Python 3.

Reproducible: Always

Steps to Reproduce:
1. docker run --rm -i -t wking/gentoo-portage:20140911 /bin/bash
2. emerge -av dev-python/webtest
3. python3.3 -c 'import webtest'

Actual Results:  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.3/site-packages/webtest/__init__.py", line 11, in <module>
    from webtest.app import TestApp
  File "/usr/lib64/python3.3/site-packages/webtest/app.py", line 41, in <module>
    from webtest import lint3 as lint
ImportError: cannot import name lint3


Expected Results:  
No output.
Comment 1 W. Trevor King 2014-10-08 15:39:50 UTC
With webtest-1.4.3-r1.ebuild I also needed to add lxml to DEPEND[test] to avoid:

  ImportError: You must have lxml installed to use response.lxml

when I installed with tests enabled.  It looks like the lxml business is optional, but the test suite is not instrumented to skip the lxml-requiring tests if lxml isn't installed.  I haven't checked how that works for WebTest 2.x.

I'm tracking my change for my wtk overlay in the per-package Git branch [1], forked off of the work from the now-defunct github.com/rich0/gentoo-gitmig-2014-02-21 [1].

[1]: http://git.tremily.us/?p=wtk-overlay.git;a=shortlog;h=refs/heads/dev-python/webtest
Comment 2 W. Trevor King 2014-10-08 16:08:38 UTC
(In reply to W. Trevor King from comment #1)
> I haven't checked how that works for WebTest 2.x.

2.0.11 has a similiar test failure without lxml installed.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2014-10-10 16:17:40 UTC
lxml added to latest version, webtest-1.4.3-r1 is 2 years old now and as a stable warrants a new candidate for going stable.  Recent versions have well moved past not importing under py3 with this bug.  This version would be better purged.
Comment 4 W. Trevor King 2014-10-10 19:57:53 UTC
(In reply to Ian Delaney from comment #3)
> lxml added to latest version

Turns out that was a mostly-false alarm due to testing with ebuild instead of emerge.  All versions of webtest have a test dependency on dev-python/pyquery, and all versions of pyquery have an RDEPEND for lxml.  So there's no way to get the webtest[test] requirements without pulling in lxml.  Still, webtest also uses lxml directly, so listing it as a direct dependency also makes sense to me (it's conceivable that the webtest usage would have a different compatibility range than the pyquery usage).

Stabilizing something in the 2.x series sounds good to me too.  Quite a few of the 2.x versions have been unstable in the tree for months without reported problems (besides the lxml mostly-false alarm here).