Yelp/python-gearman — pull request #63 by svisser (2014-09-08 00:35:26+00:00)
Title: Various changes towards making codebase compatible with 2.x and 3.x

This commit makes all non-risky changes towards making the codebase compatible with Python 2.x and Python 3.x. More work is needed to make all tests pass and to ensure Unicode / bytes separation happens properly.

The changes made in this commit are:

- Clean up `DeprecationWarnings` regarding [outdated test method aliases][1].
- Changed various `.iterkeys()`, `.itervalues()` methods to be `.keys()` and `.values()` instead (which behave as expected in Python 3.x).
- Use new `exception Exception as exc` syntax instead of the outdated comma syntax for catching exceptions.
- Added three `list()` calls to ensure an assertion passes in `def set_abilities` in `worker_handler.py`. It may be possible to remove these `list()` calls and the assertion altogether but that should be done when going over the code for full Python 2.x and 3.x compatibility.

[1]: https://docs.python.org/2/library/unittest.html#deprecated-aliases