[openstack-dev] [all] Testtools 1.7.0 may error if you installed it before reading this email

Robert Collins robertc at robertcollins.net
Thu Mar 12 02:59:41 UTC 2015


On 12 March 2015 at 13:18, Ian Wienand <iwienand at redhat.com> wrote:
> On 03/12/2015 10:37 AM, Ian Wienand wrote:
>>     File "/tmp/easy_install-mV2rSm/unittest2-1.0.0/unittest2/case.py", line 16, in <module>
>>   ImportError: cannot import name range
>>   Complete output from command python setup.py egg_info:
>
> OK, so this suggests the version of "six" is wrong.
>
> unittest2 does have an uncapped dependency [1]
>
> looking at six, "range" was added between 1.3.0 & 1.4.0
...
> but it hadn't got there yet.  Filed [2].
>
> I think the wheel works because pip gets to it after six has been
> upgraded.
>
> Even then, I'm not sure that would fix it.  I've had similar issues
> before; I still don't fully understand why but "pip install a b" does
> *not* install a then b, apparently by design [2].  This deep in I'm
> not sure how the dependencies will order.

Thanks for digging up the release of six. I've added the versioned dep
and released unittest2 1.0.1 which has that and only that fix in it.
Hopefully that will prevent the issue.

The late version object shim is fragile though, so its likely not to
work in many places - wheels will always be a better path forward for
installing it until I get around to some proper magic to fix the
version lookup stuff.

-Rob

-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud



More information about the OpenStack-dev mailing list