Resolve urlencode import with tolerance for Python 3

Why is `noqa` necessary here? Wouldn't it make more sense to just remove the import completely?