diff options
author | Victor Stinner <vstinner@redhat.com> | 2015-05-20 11:29:30 -0700 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2015-05-20 12:47:02 -0700 |
commit | e6d19f151f8f7c9729af44fbc88ee6d5babafc3a (patch) | |
tree | 9c39fa780075f2eafab77fb960f789b97705bdd7 /test-requirements.txt | |
parent | 7f6a18b041eba88133db7ac5518cb2163bee7e03 (diff) | |
download | glance_store-e6d19f151f8f7c9729af44fbc88ee6d5babafc3a.tar.gz |
Fix Python 3 issues
* Replace it.next() with next(it)
* Replace dict.iteritems() with six.iteritems(dict)
* Replace unicode with six.text_type
* Replace dict(d1.items() + {'Cookie': cookie}.items()) with:
d3=dict(d1); d3['Cookie'] = cookie
* Replace map(func, parts) with [func(part) for part in parts]
* Open file in binary mode (not in text mode) to load JSON using
jsonutils.load()
* Avoid using dict.keys()[0] or dict.values()[0]: on Python 3, keys()
and values() methods of dictionaries return iterators, not lists
For more information on Python 3, see:
https://wiki.openstack.org/wiki/Python3
Change-Id: Ib09a3367d8dcb664911a0b187da9e363a96727fd
Diffstat (limited to 'test-requirements.txt')
0 files changed, 0 insertions, 0 deletions