[1.6.x] Took advantage of django.utils.six.moves.urllib.*.

Backport of 6a6428a36 from master.