Skip to content

Commit a13917a

Browse files
author
Jordan Adler
committed
Revert "allow mixed string type inputs to misc urllib.parse.* functions"
This reverts commit 62b4c35.
1 parent d87c56e commit a13917a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/future/backports/urllib/parse.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ def _coerce_args(*args):
107107
# an appropriate result coercion function
108108
# - noop for str inputs
109109
# - encoding function otherwise
110-
str_input = isinstance(args[0], basestring)
110+
str_input = isinstance(args[0], str)
111111
for arg in args[1:]:
112112
# We special-case the empty string to support the
113113
# "scheme=''" default argument to some functions
114-
if arg and isinstance(arg, basestring) != str_input:
114+
if arg and isinstance(arg, str) != str_input:
115115
raise TypeError("Cannot mix str and non-str arguments")
116116
if str_input:
117117
return args + (_noop,)

0 commit comments

Comments
 (0)