- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 7k
 
          Fix UnicodeDecodeError, which can occur on serializer repr.
          #2279
        
          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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this line enough for both py2 and py3 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Python 2 expects repr to return str values. Given that we're using unicode throughout, we need to forcibly coerce those immediate prior to returning the values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget about my previous comment, I was doing conversions the wrong way in the repr.
…-bug Use unicode internally everywhere for 'repr'.
UnicodeDecodeError, which can occur on serializer repr.
      
Closes #2270.
We're now using unicode internally everywhere when building the
reprand only coercing to str (for python 2) immediately prior to returning.