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

Ian Wienand iwienand at redhat.com
Thu Mar 12 00:18:17 UTC 2015


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

---
changeset:   86:cffb4c1e3ab3
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Apr 19 13:46:44 2013 -0400
summary:     add six.moves.range alias (fixes #24)

1.4.0                            140:d5425164c2d9
1.3.0                             83:2f26b0b44e7e
---

and yes, centos7 ships with six 1.3 packaged.

Now, keystone *was* intending to upgrade this

---
2015-03-11 01:17:15.176 | Collecting six>=1.9.0 (from keystone==2015.1.dev395)
---

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.

-i

[1] https://hg.python.org/unittest2/file/459137d78c16/setup.py
[2] https://code.google.com/p/unittest-ext/issues/detail?id=94
[3] https://github.com/pypa/pip/issues/2473



More information about the OpenStack-dev mailing list