tumblr / pytumblr

A Python Tumblr API v2 Client
Apache License 2.0
723 stars 196 forks source link

Support Python3 #51

Closed codingjester closed 7 years ago

codingjester commented 10 years ago

We should try to support python3, it's 2.X eventually will be deprecated and we should do our best to make sure that we can support it going forward.

jaseg commented 9 years ago

Any updates on this? I just almost got it working, it only required a one-line change on setup.py (use_2to3=True) and an additional .encode() somewhere in request.py. The problem was lastly that python-oauth2, which I also was able to trivially fix to install on python3 seems to have some serious encoding issues (sometimes using hardcoded utf8 and apparently sometimes using system encoding) and seems to sign wrongly encoded data leading to a "401 Not autorized" from tumblr.

There is still some time to fix this in 2014 ;)

gfleetwood commented 9 years ago

Could someone detail what changes should be made so this can work in Python 3?

Ivoz commented 9 years ago

@gfleetwood for a start it needs to switch dependency away from the current old oauth2 package, which only supports python 2.

rbreu commented 9 years ago

@gfleetwood: There's an open pull request for this: https://github.com/tumblr/pytumblr/pull/66

davidtys commented 8 years ago

Hello,

pytumblr is not yet fully compatible with python3 :

Using 2to3 makes it work. But the requests return the error : the JSON object must be str, not 'bytes'

Thks

jabbalaci commented 7 years ago

I made a fork and partially converted the project to Python 3: https://github.com/jabbalaci/pytumblr . With this version you can upload photos to Tumblr under Python 3. I didn't try the other functionalities since I only needed the photo support.

jasonpenny commented 7 years ago

pytumblr now supports python3