idan/oauthlib — pull request #56 by mikix (2012-08-31 22:02:09+00:00)
Title: Support Python 3

These are mostly unicode string related changes and a few syntax ones. The diff is a bear to read because of all the minor u's' -> 's' changes. :(

https://github.com/idan/oauthlib/issues/55

Tests pass under both Python2.7 and Python3.2. I don't happen to have a machine with 2.6 on it available right now. I will test later with 2.6.

The only thing I would qualify as a Change was in test_signatures.py:test_collect_parameters(), I made all the inputs unicode. The old code path worked in Python2 because it's a bit looser. But not in Python3, because 's' != b's'.

I had a hard time telling whether, as a matter of API, collect_parameters required its inputs to be unicode or not, but I assumed it did since so many other bits of API seemed to require that. But if I was wrong, I can go back and fix up that whole code path to work under both encoding (and spit out the same as it was given).