Support for Python 3.  Includes 2.7-compatible changes for import, exceptions, dict key lookup, etc.