Skip to content
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

unicode ssl errors #26

Closed

Conversation

stefanfoulis
Copy link

fix for #24

This PR DOES NOT WORK YET. I'm opening it to start a discussion on how we should approach this problem. My current approach seems tedious. There must be a better way.

There are a lot of subtle problems with python3 (the testsuite does not pass yet).
The testsuite passes on python2 (except for AWS4Auth_GetCanonicalHeaders_Test.test_headers_amz_example which did not pass before my changes either).

This PR might not be necessary at all if kennethreitz/requests#3573 is fixed. Although there might be more subtleties, because:

# python 2
>>> x = {u'a': 42, b'b': 42}
>>> b'a' in x
True
>>> u'a' in x
True
>>> b'b' in x
True
>>> u'b' in x
True
# python 3
>>> x = {u'a': 42, b'b': 42}
>>> b'a' in x
False
>>> u'a' in x
True
>>> b'b' in x
True
>>> u'b' in x
False

current python3 testsuite output: https://gist.github.com/stefanfoulis/1c9b46a61beba2e6423caa746006cae0

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.

None yet

1 participant