Skip to content

Conversation

Owanesh
Copy link

@Owanesh Owanesh commented Feb 24, 2018

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')}

- Unicode message in post_mortem (py3) - Unicode concatenation in post_mortem (py2)
@astagi
Copy link

astagi commented Feb 24, 2018

+1

@d3v-null
Copy link
Owner

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.

d3v-null pushed a commit that referenced this pull request Oct 13, 2018
d3v-null pushed a commit that referenced this pull request Oct 13, 2018
@d3v-null
Copy link
Owner

All done! Please feel free to test / submit a failing test.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants