]> git.ipfire.org Git - thirdparty/patchwork.git/commit
py3: "Modernize" code base
authorStephen Finucane <stephen.finucane@intel.com>
Thu, 26 Nov 2015 19:43:37 +0000 (19:43 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 3 Dec 2015 22:08:55 +0000 (22:08 +0000)
commitbcb65281b432a86ae092989e4226561830b294b1
tree62cae79403b11ae29c70c2ac4ad7ca8e66b0bdf2
parentc9ad6b85d8eaf3ead23384bb227dcc89545c42a8
py3: "Modernize" code base

Run code through the 'modernize' application to fix Python 3
compatibility while also retaining Python 2 backwards compatibility.

There are some key changes made to the autogenerated code:

* Don't wrap 'items()' in 'list' for for loops - it's not necessary
* Don't wrap 'keys()' in 'list' - just drop 'keys()'
* Use Django's version of six rather than the upstream one

Many of the issues found are based upon the changed definitions of the
map, keys and items functions, along with the removal of the iteritems
function and reduce keyword.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
16 files changed:
patchwork/bin/parsemail.py
patchwork/filters.py
patchwork/paginator.py
patchwork/parser.py
patchwork/templatetags/listurl.py
patchwork/templatetags/syntax.py
patchwork/tests/test_bundles.py
patchwork/tests/test_checks.py
patchwork/tests/test_list.py
patchwork/tests/test_person.py
patchwork/tests/test_xmlrpc.py
patchwork/tests/utils.py
patchwork/utils.py
patchwork/views/mail.py
patchwork/views/patch.py
patchwork/views/xmlrpc.py