[1.6.x] Fixed deprecation warning on Python 3
[1.6.x] Fixed deprecation warning on Python 3

Backport of b7451b72 from master.

dex4er/django,dex4er/django,redhat-openstack/django,felixjimenez/django,redhat-openstack/django,felixjimenez/django,django-nonrel/django,felixjimenez/django,felixjimenez/django,redhat-openstack/django,django-nonrel/django,dex4er/django,django-nonrel/django,redhat-openstack/django,django-nonrel/django