Skip to content

Conversation

@lovelydinosaur
Copy link
Contributor

Closes #2270.

We're now using unicode internally everywhere when building the repr and only coercing to str (for python 2) immediately prior to returning.

@lovelydinosaur lovelydinosaur added this to the 3.0.2 Release milestone Dec 15, 2014
Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

lovelydinosaur added a commit that referenced this pull request Dec 15, 2014
…-bug

Use unicode internally everywhere for 'repr'.
@lovelydinosaur lovelydinosaur merged commit af53e34 into master Dec 15, 2014
@lovelydinosaur lovelydinosaur deleted the fix-serializer-repr-unicode-bug branch December 15, 2014 12:04
@lovelydinosaur lovelydinosaur changed the title Use unicode internally everywhere for 'repr'. Fix UnicodeDecodeError, which can occur on serializer repr. Dec 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix UnicodeDecodeError, which can occur on serializer repr.

3 participants