Fix compatibility issues with Python 3 and newer Django 1.x releases.
Review Request #10453 — Created March 19, 2019 and submitted
Some recent additions to Djblets broke compatibility with Python 3 and
with newer versions of Django. These breakages were pretty small, and
fortunately caught by unit tests (though there may be other breakages
not caught by tests).
This change fixes each of these, allowing tests to run again on all
supported Django 1.x releases and on both Python 2.7 and 3.5-3.7.
Unit tests pass on Django 1.6 and 1.11, with Python 2.7 and 3.5-3.7.