* Fix sort(): dictionaries are no more comparable on Python 3, use a key
function building a sorted list of the dictionary items
* Replace __builtin__ with six.moves.builtins
* get_hash_str() now accepts Unicode: Unicode is encoded to UTF-8
before hashing the string. Mention also the hash method (MD5) in the
docstring.
* LastBytesTestCase: use binary files instead of text files. Use also a
context manager on the TemporaryFile to ensure that the temporary file
is closed (even on error).
* Functions: use the __code__ attribute instead of func_code, and
__closure__ instead of func_closure. These attributes are also
available on Python 2.6.
* Replace unichr() with six.unichr()
* SafeTruncateTestCase(): write directly the chinese Unicode character
instead of using safe_decode() (which is not reliable, it depends on
the locale encoding!)
* sanitize_hostname(): On Python 3, decode the hostname from Latin1 to
get back Unicode. Add also a comment explaining the purpose of the
conversion to Latin1.
* last_bytes(): replace the hardcoded constant 22 with errno.EINVAL and
add a comment explaining how the function works.
* tox.ini: add nova.tests.unit.test_utils to Python 3.4
Blueprint nova-python3
Change-Id: I96d9b0581ceaeccf9c35e0c9bada369e9d19fd15