Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 450658 - dev-python/ws4py: uses unittest2 in py2.7 & py3.2+
Summary: dev-python/ws4py: uses unittest2 in py2.7 & py3.2+
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL: https://github.com/Lawouach/WebSocket...
Whiteboard:
Keywords:
Depends on: 487804
Blocks: 450616
  Show dependency tree
 
Reported: 2013-01-06 19:54 UTC by Michał Górny
Modified: 2014-02-24 05:58 UTC (History)
2 users (show)

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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-06 19:54:43 UTC
The package unconditionally uses unittest2 as the test collector. I think that shouldn't be necessary in py2.7/3.2+.
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2013-01-10 07:30:27 UTC
yes ditto.  There's also 1 test that fails under 3.2  See See Also:  It's routine to make if (<=py2.6 or =py3.1) them import unittest2, I've already done it somewhere recently,  but I shall hold at for a fix to the test fail and do the 2 in 1, if that's ok with you, y mgorny
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2013-01-11 14:26:19 UTC
on 2nd. thoughts, is this a case of attempting to fix something that's not really broken?  You could

import sys
if sys.version_info[:2] == (2, 7) or sys.version_info[:3] == (3,2);
    test_suite='unittest.collector'
else:
    test_suite='unittest2.collector'

in setup.py, then you have to add DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
in the regular distutils to ensure a setup.py to match either of the 2.

else similar for each instance of
"import unittest" in test/test_*.py,

then send it upstream, than await official acceptance, when it currently just works, Whether using distutils or distutils-r1, all this to substitute something that already does it all.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-11 19:17:06 UTC
And my second thought would be that the 'collector' submodule is setuptools-specific and it is found only in unittest2. So it's not something we can or should try to upstream.

However, I see this as an unnecessary dep on a Gentoo system. My goal would be to fix packages so that modern py2.7/3.2 system would run without unittest2 installed at all.

Considering that the 'collector' submodule is setuptools-specific, probably easiest way would be to run the test discovery directly. However, this requires us to make python_test() aware of which Python versions need unittest2... I wonder if we could install some kind of helper file in the virtual.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2013-01-14 03:47:17 UTC
ah right;  getting there....
Comment 5 Patrick Lauer gentoo-dev 2014-02-24 05:58:39 UTC
+  24 Feb 2014; Patrick Lauer <patrick@gentoo.org> +ws4py-0.3.2.ebuild:
+  Bump #487804 #450658