Skip to content

import urlencode() from six.moves.urllib.parse instead of from urllib #268

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
merged 2 commits into from
Jun 2, 2017

Conversation

anthrotype
Copy link

@anthrotype anthrotype commented May 28, 2017

Fixes AttributeError on Python 3, as urlencode function has been moved from urllib to urllib.parse module.

six.moves.urllib.parse.urlencode() is an py2.py3 compatible alias of urllib.parse.urlencode() on Python 3, and of urllib.urlencode() on Python 2.

Cosimo Lupo added 2 commits May 28, 2017 19:03
Fixes AttributeError on Python 3, as `urlencode` function has been moved to `urllib.parse` module.

`six.moves.urllib.parse.urlencode()` is an py2.py3 compatible alias of `urllib.parse.urlencode()` on Python 3, and of `urllib.urlencode()` on Python 2.
@anthrotype
Copy link
Author

ping @gpocentek

@gpocentek
Copy link
Contributor

Thanks!

@gpocentek gpocentek merged commit 88900e0 into python-gitlab:master Jun 2, 2017
@anthrotype anthrotype deleted the fix-urlencode-py3 branch June 5, 2017 17:08
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.

2 participants