Require six for cross Python compatibility. Update imports for Python 3 compatibility.
Prefer print_function for Python 3 compatibility

--HG--
extra : amend_source : 96fd71ff2b2e1e7473fdd99f2c5b2ffd701245e7