The function xrange() was renamed to range() in Python 3.
Use "from six.moves import range" to get xrange() on Python 2 and range() on
Python 3 as the name "range", and replace "xrange()" with "range()".
The import is omitted for small ranges (1024 items or less).
This patch was generated by the following tool (revision 0c1d096b3903)
with the "xrange" operation:
https://bitbucket.org/haypo/misc/src/tip/python/sixer.py
Manual change:
* Replace range(n) with list(range(n)) in a loop of
nova/virt/libvirt/driver.py which uses list.pop()
Blueprint nova-python3
Change-Id: Iceda35cace04cc8ddc6adbd59df4613b22b39793
Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables
fixes bug 1171936
Change-Id: I293d7ebb875f65cce322d4938d1ae323f3aded8d
Fix some PEP8 issues in doc/ext/nova_todo.py and doc/source/conf.py
and make the code look more clearly.
Change-Id: I2b0ce1b09a4a707cffaa565747aabd5346eb9f41
Fixed some warnings like this:
DeprecationWarning: docutils.nodes.Element.set_class deprecated; append to
Element['classes'] list attribute directly
lists[i].set_class('todo_list')
Change-Id: I94e564f561f95a66e6e98767ccfaa78769b5c0f1