Skip to content

Commit 0cd1e50

Browse files
authored
Merge pull request #463 from jmadler/master
Revert "allow mixed string type inputs to misc urllib.parse.* functions"
2 parents d6821d6 + a13917a commit 0cd1e50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/future/backports/urllib/parse.py

Lines changed: 2 additions & 2 deletions
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)