[py3k] Don't encode URLs
authorRémi Cardona <remi.cardona@logilab.fr>
Mon, 21 Sep 2015 18:28:10 +0200
changeset 10723 c5bedfdd1b22
parent 10722 1d0b5aef7523
child 10724 aa3eedba866c
[py3k] Don't encode URLs Python 3's urllib works with unicode objects.
req.py
--- a/req.py	Mon Sep 21 18:04:22 2015 +0200
+++ b/req.py	Mon Sep 21 18:28:10 2015 +0200
@@ -353,7 +353,7 @@
 
         newparams may only be mono-valued.
         """
-        if isinstance(url, unicode):
+        if PY2 and isinstance(url, unicode):
             url = url.encode(self.encoding)
         schema, netloc, path, query, fragment = urlsplit(url)
         query = parse_qs(query)