Conversation
|
Thanks for your input. The goal of this branch is to have a code base that works in both Python 2.6+ and Python 3.2+. As is, your code only works in Python3. Some minor changes to your usage of str() will be needed to have it work in both versions. |
|
Also have you filled out Google's CLA (Contributor License Agreements)? I will need to have you submit one before I can accept your pull requests. Thanks! |
|
Oh, I see and didn't realize. I'll fix it to work with Python 2.6+ too. And regarding the CLA I haven't filled out anything. I just hopped on your code and made those few changes :). I'll look into it in details, fill out the CLA and come back later. Thanks for pointing those things out. |
|
Ok, I fixed it to work in 2.6 (2.6.9 on my local machine) using |
Pull recent auth2client release (crypt + timeout)
I needed to use your Python3 version of oauth2client but I got into two issues which gave me errors. So I decided to fix them:
httplib2.Http'srequest()method in python3 returns thecontentasbytesinstead ofstr(as it was in python2) which caused_parse_exchange_token_response(content)to fail because the inner json parsing machinery checks if thecontentis of typestr. To fix this I simply converted it tostrusing utf-8._urlsafe_b64decode()function wrongly concatenatedbytes(which came from callingencode()on theb64stringargument) with astr(created by multiplying the string"="). I fixed this by concatenatingbytesand at the end converting tostrusing utf-8.