urlparse do not support reverse_lazy as url arg
|Reported by:||Claude Paroz||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.