Skip to content

Python 3 support #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Python 3 support #125

wants to merge 3 commits into from

Conversation

mitchellrj
Copy link

All tests passing on latest versions of Python 2.5, 2.6, 2.7 & 3.2.

Python 2.4 tests fail, but were failing anyway. I'd advise the README is updated to reflect this.

Alternate expectations in tests are purely due to Python 3's handling of unicode strings.

@joestump
Copy link
Owner

See #158 for more. cc @jaitaiwan

@joestump joestump added the PY3K label Jul 29, 2015
@jaitaiwan
Copy link
Contributor

Darn this looks promising. I'll have to check mine again, because I think I opted for breaking py2x compatibility in favour if py3k. Once I've rebased my PR we'll see if the tests pass or fail.

@mitchellrj reckon you'd be keen on rebasing your PR? See if your tests are still passing.

@mitchellrj
Copy link
Author

I'm unable to work on this right now, I will try to take a look sometime in
August.
On 29 Jul 2015 12:36 pm, "Daniel Holmes" [email protected] wrote:

Darn this looks promising. I'll have to check mine again, because I think
I opted for breaking py2x compatibility in favour if py3k. Once I've
rebased my PR we'll see if the tests pass or fail.

@mitchellrj https://github.com/mitchellrj reckon you'd be keen on
rebasing your PR? See if your tests are still passing.


Reply to this email directly or view it on GitHub
#125 (comment)
.

@jaitaiwan jaitaiwan self-assigned this Jul 29, 2015
@jaitaiwan
Copy link
Contributor

I'll see if I can rebase and check the tests are passing or not.

@jaitaiwan
Copy link
Contributor

Here's the results of the rebase and test against py3k in travis: https://travis-ci.org/CentricWebEstate/python-oauth2/builds/75876246

So great to see that it still passes on 2k but 3k's going to need some work.

@jaitaiwan
Copy link
Contributor

Thanks for everyone who contributed to getting py3k out the door. Closing this as it is resolved by release 1.9

@jaitaiwan jaitaiwan closed this Oct 3, 2015
@@ -490,7 +542,7 @@ def sign_request(self, signature_method, consumer, token):
# section 4.1.1 "OAuth Consumers MUST NOT include an
# oauth_body_hash parameter on requests with form-encoded
# request bodies."
self['oauth_body_hash'] = base64.b64encode(sha(self.body).digest())
self['oauth_body_hash'] = s(base64.b64encode(sha(b(self.body)).digest()))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • E501 line too long (85 > 79 characters)

self.failUnlessEqual(kw['redirections'], httplib2.DEFAULT_MAX_REDIRECTS)
self.failUnless(isinstance(kw['headers'], dict))
self.assertTrue(cl is client)
self.assertEqual(frozenset(kw.keys()), frozenset(['method', 'body', 'redirections', 'connection_type', 'headers']))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • E501 line too long (127 > 79 characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants