Skip to content

allow mixed string type inputs to misc urllib.parse.* functions #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

snarfed
Copy link
Contributor

@snarfed snarfed commented Mar 21, 2018

...eg urlparse, urlunparse, urlsplit, urlunsplit, urljoin, urldefrag, and parse_qsl.

fixes #273.

the original bug result in this kind of exception:

Traceback (most recent call last):
  ...
  File ".../future/backports/urllib/parse.py", line 387, in urlunparse
    _coerce_args(*components))
  File ".../future/backports/urllib/parse.py", line 115, in _coerce_args
    raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments

snarfed added a commit to snarfed/webutil that referenced this pull request Mar 24, 2018
specifically PythonCharmers/python-future#321 and PythonCharmers/python-future#331.

I tried telling setup.py to use my fork on github instead, with dependency_links=, but that requires users to install with pip install --process-dependency_links, which I don't want to depend on.
...eg urlparse, urlunparse, urlsplit, urlunsplit, urljoin, urldefrag, and parse_qsl.

fixes PythonCharmers#273.

the original bug result in this kind of exception:

```
Traceback (most recent call last):
  ...
  File ".../future/backports/urllib/parse.py", line 387, in urlunparse
    _coerce_args(*components))
  File ".../future/backports/urllib/parse.py", line 115, in _coerce_args
    raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments
```
@snarfed snarfed force-pushed the urllib_parse_mix_str_and_nonstr branch from 1df5b23 to 62b4c35 Compare October 10, 2018 21:53
@jmadler jmadler merged commit ce37c48 into PythonCharmers:master May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

future.backports.urllib.parse.urlunsplit breaks with mixed unicode and str inputs
2 participants