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.
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
(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.
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.
(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).