d3v-null / wp-api-python

A Python wrapper for the WooCommerce API.
MIT License
141 stars 34 forks source link

Hotfix/post mortem #3

Closed Owanesh closed 5 years ago

Owanesh commented 6 years ago

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

astagi commented 6 years ago

+1

d3v-null commented 5 years ago

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 commented 5 years ago

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