Closed Owanesh closed 5 years ago
+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')
}