summaryrefslogtreecommitdiff
path: root/requests/compat.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2015-01-18 21:51:49 -0600
committerIan Cordasco <graffatcolmingov@gmail.com>2015-01-20 20:44:52 -0600
commiteec44dbbb1a0ce0427bf5151aa32ad5fcd1898e5 (patch)
tree714b99a521c363d5e54f2417762af6975422b0f4 /requests/compat.py
parentd2d576b6b1101e2871c82f63adf2c2b534c2dabc (diff)
downloadpython-requests-eec44dbbb1a0ce0427bf5151aa32ad5fcd1898e5.tar.gz
Check that a filename is a basestring instance
Instead of only checking one or another type of string-like object that we accept, let's be able to check both. Previously, we only checked if the filename was an instance of the native str type which on Python 2 excluded unicode filenames and bytes-like filenames on Python 3. Fixes #2411
Diffstat (limited to 'requests/compat.py')
-rw-r--r--requests/compat.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/requests/compat.py b/requests/compat.py
index c07726ee..57f474c0 100644
--- a/requests/compat.py
+++ b/requests/compat.py
@@ -99,7 +99,6 @@ if is_py2:
basestring = basestring
numeric_types = (int, long, float)
-
elif is_py3:
from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
from urllib.request import parse_http_list, getproxies, proxy_bypass