python-tent-client icon indicating copy to clipboard operation
python-tent-client copied to clipboard

Python 3 support

Open longears opened this issue 12 years ago • 5 comments

I've only tried this code on Python 2.6.1.

Do the dependencies support Python 3?

longears avatar Sep 29 '12 08:09 longears

I had a look and, no, the macauthlib is not compatible python 3. It fails almost every unittest when used with python 3. At least it's dependency WebOb is compatible python 3 so it shouldn't be impossible to port macauthlib.

Edit: actually it may not be a problem for a long time anymore :) https://github.com/mozilla-services/macauthlib/issues/4

mart-e avatar Oct 04 '12 12:10 mart-e

Great!

Or if we decide to move away from macauthlib there was an almost-working attempt at MAC Authentication in an old version of our own code: https://github.com/longears/python-tent-client/blob/e6a2c32b7c0d81e8b6cd9fe1361578227f189d8e/tentapp.py#L33-71 The server never accepted it, though. I think the hostname might be thing that was wrong about it.

longears avatar Oct 04 '12 17:10 longears

I just implemented authentication in PHP. If you don't mind, I could take a look at it. Then we can get rid of macauthlib and requests containing url-escaped chars should work.

johankj avatar Oct 04 '12 17:10 johankj

Sure! _authHook would need to be updated to pull the hostname out of the request object and then sign it using the old MAC auth code.

longears avatar Oct 04 '12 17:10 longears

I've got it working now, but got some git-issues. I'll fix them later tomorrow.

johankj avatar Oct 04 '12 19:10 johankj