Support Python3 #51

Open
codingjester opened this Issue Sep 3, 2014 · 6 comments

Projects

None yet

7 participants

@codingjester
Contributor

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
jaseg commented Dec 10, 2014

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

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

@Ivoz
Ivoz commented Jul 15, 2015

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

@rbreu
rbreu commented Jul 16, 2015

@gfleetwood: There's an open pull request for this: #66

@davidtysman

Hello,

pytumblr is not yet fully compatible with python3 :

  • Relative import into helpers.py
  • urllib2 instead of the new modules
  • ...

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

Thks

@jabbalaci

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.

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