Skip to content

Conversation

hayd
Copy link

@hayd hayd commented Jul 31, 2015

This is a single commit on top of #176.

Changes the import statements to be more explicit, tests should pass on 2.6+ and 3 (they do locally)...


However, I had to skip a failing test, which fails on master too. (I didn't use skipTest as unittest on python 2.6 doesn't have it, and didn't want to use unittest2, so I commented it out!)

======================================================================
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'

Note:

quote("['one', 'two']") == "%5B%27one%27%2C%20%27two%27%5D"

So I think this is a legitimate bug.

Daniel J Holmes (jaitaiwan) and others added 3 commits July 30, 2015 13:46
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.
@hayd hayd changed the title Pr/176 Another python 3 PR... Jul 31, 2015
@hayd
Copy link
Author

hayd commented Jul 31, 2015

eeep, I made a mistake somehow and didn't test this properly. Will update with a fix. Edit: There's a lot of failures actually (50/72). :(

@hayd hayd 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.

2 participants