-
Notifications
You must be signed in to change notification settings - Fork 31
Hotfix/post mortem #3
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
- Unicode message in post_mortem (py3) - Unicode concatenation in post_mortem (py2)
astagi
commented
Feb 24, 2018
+1
Hey all,
I'd like to apologise for neglecting this PR. I'll do my best today to integrate these changes into my fork along with the rest of the improvements that have happened since then.
The project which I made this repo for uses python2, and my test automated cases are not exhaustive enough to cover some of the python3 specific problems that underpin this, so I'll also be adding more test cases to increase coverage.
The solution that is proposed in this PR works specifically on Python3 but not Python2, which is why I need to re-work it to use six.text_type instead of str.
Thanks.
All done! Please feel free to test / submit a failing test.
Thanks.
When you have a mismatch between version of WPRest and configuration of python api, you will not have a match with url and request goes into post_mortem.
Postmortem, generate "reason" variable in unicode format, but "unicode" is no longer supported in python3
{solved with lambda}
Postmortem, in python2, generate an error with concatenation of string, str + unicode = error
{solved with
reason.encode('utf8')
}