Skip to content

fix processing unicode symbols in query_string by Python 2 #5552

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 3 commits into from
Nov 6, 2017

Conversation

nikulin
Copy link
Contributor

@nikulin nikulin commented Nov 2, 2017

Existing code fails under Python 2.7 if it got incorrect unicode from query string (see new tests).
I propose fix that allow correctly work under Python 2 & 3.

Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. This seems popular. 😃

Seems fine.

My only thought is that the test values are a little bit opaque. Could we add a comment, or maybe escape them in place, to make it clearer?

@carltongibson carltongibson added this to the 3.7.2 milestone Nov 6, 2017
Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I added the comments. Thanks for the input!

@carltongibson
Copy link
Collaborator

And, of course, I forget to declare the file encoding. Sigh... 😃

@carltongibson carltongibson merged commit 7a278b3 into encode:master Nov 6, 2017
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