Check that a filename is a basestring instance
authorIan Cordasco <graffatcolmingov@gmail.com>
Mon, 19 Jan 2015 03:51:49 +0000 (21:51 -0600)
committerIan Cordasco <graffatcolmingov@gmail.com>
Wed, 21 Jan 2015 02:44:52 +0000 (20:44 -0600)
commiteec44dbbb1a0ce0427bf5151aa32ad5fcd1898e5
tree714b99a521c363d5e54f2417762af6975422b0f4
parentd2d576b6b1101e2871c82f63adf2c2b534c2dabc
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
requests/compat.py
requests/utils.py
test_requests.py