mozilla/PyBrowserID — pull request #19 by rfk (2012-10-03 02:11:44+00:00)
Title: Support for Python3

These commits add native support for python3. It was surprisingly straightforward given that we are already restricting ourselves to python2.6 and above!

Key points:

* the crypto primitives always deal with bytes, never unicode
* the jwt spec dictates that it's always utf8-encoded JSON, which simplifies things
* most other changes are to work around differences between py2 and py3:
* there is no bytes.encode("hex") method in py3, so use binascii.hexlify
* there is no "long" type in py3

@ametaireau r?