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

Treq now requires bytes, not str, so encoding is up to the client #298

Merged
merged 2 commits into from
Dec 18, 2018

Conversation

aren
Copy link
Contributor

@aren aren commented Nov 29, 2018

@jessewgibbs
Copy link
Contributor

@aren thanks for the contribution.

@rokob can you review?

@rokob
Copy link
Contributor

rokob commented Nov 29, 2018

My main concern is that this needs to work with both Python 2 and 3. I think we have tests for both and it looks like it is passing so it probably is okay. Let me just double check, but otherwise it looks good to me.

@aren
Copy link
Contributor Author

aren commented Nov 29, 2018

I did test on both 2 and 3, but another set of eyes is always appreciated.

@AdrianLC
Copy link

👍 I just tested this on python 3.6 seems to work. Really lucky I found the fix that you just sent today, thanks!

@rokob
Copy link
Contributor

rokob commented Dec 18, 2018

So I played around with this, encode can raise UnicodeDecodeError and UnicodeEncodeError depending on the value of the receiver, so I changed this to handle those exceptions, otherwise looks good to me.

@rokob rokob merged commit d37d68d into rollbar:master Dec 18, 2018
@aren aren deleted the treq_encoding branch June 3, 2019 00:14
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.

4 participants