This PR adds python 3 compatibility to the Shotgun Python API. Specifically, these changes remove support for python 2.6 and add support for python 3.6+.
Things to consider during review:
A requirement on six has been added. SG team may want to bundle six with the API rather than adding a requirement.
Removed legacy support for python 2.4 - 2.6. This means removing some of the bundled modules that are now available in python 2.7+.
Added an updated httplib2 with python 3 support.
Nose tests run successfully with python 2.7, 3.6, and 3.7
Some of the classes that were included in the 4k+ lines shotgun.py have been broken out into their own files for maintainability (and sanity).
The errors exported from the top-level shotgun_api3 are now exported via shotgun_api3.errors. This wasn't originally part of the plan, but some of the xmlrpclib errors exported here are not available via python 3 and this felt like a good opportunity to clean this up. It is also a bit strange that the Exceptions were being exported via the package like this. This is a backward incompatible change, so will require scrutiny from SG team.
In order to more easily sift through shotgun.py with PyCharm's inspections to find python3 compatibility (and actual code issues), a pass was done to make shotgun.py PEP-8 compliant.
This PR adds python 3 compatibility to the Shotgun Python API. Specifically, these changes remove support for python
2.6
and add support for python3.6
+.Things to consider during review:
six
has been added. SG team may want to bundlesix
with the API rather than adding a requirement.2.4
-2.6
. This means removing some of the bundled modules that are now available in python2.7
+.httplib2
with python 3 support.2.7
,3.6
, and3.7
shotgun.py
have been broken out into their own files for maintainability (and sanity).shotgun_api3
are now exported viashotgun_api3.errors
. This wasn't originally part of the plan, but some of thexmlrpclib
errors exported here are not available via python 3 and this felt like a good opportunity to clean this up. It is also a bit strange that the Exceptions were being exported via the package like this. This is a backward incompatible change, so will require scrutiny from SG team.shotgun.py
with PyCharm's inspections to find python3 compatibility (and actual code issues), a pass was done to makeshotgun.py
PEP-8 compliant.