Description

With Python 2, we could pass a reverse_lazy result (__proxy__ instance) to urlparse and the string conversion was done without problem.

With Python 3, this is failing, because urlparse is feeding url argument to a _coerce_args function which basically run: if not isinstance(url, str): str.decode(encoding, errors) .
And this is failing with an AttributeError: '__proxy__' object has no attribute 'decode'.

I think it is valuable not to have to explicitely force_text(url) each time we want to pass it to urlparse.

Mmmh... it's even worse than that, because even if we solve the issue at lazy level, the _coerce_args function will still break with a TypeError("Cannot mix str and non-str arguments") if we pass a non-empty scheme argument. But who wrote this _coerce_args function!!

So now either we find a way to make isinstance(<__proxy__ instance>, str) == True, or we have to find some workaround (custom urlparse in utils.http, document the limitation, etc.)