Skip to content

Python 3 Compatibility - #176

Closed
jaitaiwan wants to merge 1 commit into
developfrom
unknown repository
Closed

jaitaiwan wants to merge 1 commit into
developfrom
unknown repository

Conversation

@jaitaiwan

Copy link
Copy Markdown
Contributor

I'm not sure these changes ensure FULL compatibility but I believe running this should have no errors in 3 now. Also not sure if this breaks backwards compatibility...

@hayd

hayd commented Jul 30, 2015

Copy link
Copy Markdown

3.3 and 3.4 should be added to the travis matrix, potentially as allowable failures if they're failing. But currently this branch is failing. :s

@jaitaiwan

Copy link
Copy Markdown
Contributor Author

Yeh I noticed that. About to push changes which will make travis build for 3.4 and 3.3

I've done a basic update to the library to begin getting it to be python3 compatible.
A lot of upstream projects still rely on this unfortunately and their communities
are not willing to change to oauthlib. This will help to prolong the inevitable.
@jaitaiwan

Copy link
Copy Markdown
Contributor Author

Bit of work to do before this can be accepted. Since I ran the tests on the original PR looks like a bunch of things have changed.

@hayd

hayd commented Jul 31, 2015

Copy link
Copy Markdown

I have a small commit you can cherry pick to fix this (I can make a PR as I forgot to turn on travis, but it passes locally).
hayd@2cef249

all tests pass on python2 (2.6 and 2.7) and python 3.... except one (which fails in master too).

======================================================================
FAIL: test_get_normalized_parameters_multiple (tests.test_oauth.TestRequest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/andy/proj/python-oauth2/tests/test_oauth.py", line 638, in test_get_normalized_parameters_multiple
    self.assertEquals(expected, res)
AssertionError: 'oauth_consumer_key=mykey&oauth_nonce=79815175&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1295397962&oauth_version=1.0&offset=10&tag=one&tag=two' != 'oauth_consumer_key=mykey&oauth_nonce=79815175&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1295397962&oauth_version=1.0&offset=10&tag=%5B%27one%27%2C%20%27two%27%5D'

Edit: Scratch that, this PR still fails on 50/72 tests in python 3. :(

@hayd hayd mentioned this pull request Jul 31, 2015
@movinj

movinj commented Jul 31, 2015

Copy link
Copy Markdown

Hi guys.. I'm looking to use oauth2 with Python 3.4
Have you had any luck with fixing the compatibility?

@jaitaiwan

Copy link
Copy Markdown
Contributor Author

Projects only been alive for a couple days after being dead for about 4 years so we're getting there! Definitely keep an eye on this PR or even feel free to contribute...

@movinj

movinj commented Jul 31, 2015

Copy link
Copy Markdown

Thanks @jaitaiwan. I'm a rookie so may not be able to help yet.. but looking out for you guys to pull this through 👍

@rickhanlonii

Copy link
Copy Markdown
Collaborator

@jaitaiwan should we move this to a feature branch so others can help out?

@rickhanlonii

Copy link
Copy Markdown
Collaborator

I created branch feat-python-3.

@hayd

hayd commented Jul 31, 2015

Copy link
Copy Markdown

I think the best bet is to get #142 working, I had a little go (we're all re-inventing the wheel otherwise).

This was referenced Jul 31, 2015
@jaitaiwan

Copy link
Copy Markdown
Contributor Author

Yup I'm closing this one out in favour of #142

@jaitaiwan jaitaiwan closed this Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants