Add support for python3, while maintaining support for python 2. This code requires python3 > 3.6.
The biggest changes are
change in how zip is handled, especially for when iterating over lists that change
changes in how lambda functions are handled with tuple arguments
adapt all uses of print to print() (from __future__ import print_function)
ensure that all integer division is the same (from __future__ import division)
other somewhat mysterious import that the interwebs tell me is needed (from __future__ import absolute_import)
I compared the output of the following command between python 2 on the master branch and python 2 and 3 on this branch and diff'd the files. No difference.
Add support for python3, while maintaining support for python 2. This code requires python3 > 3.6.
The biggest changes are
from __future__ import print_function
)from __future__ import division
)from __future__ import absolute_import
)I compared the output of the following command between python 2 on the master branch and python 2 and 3 on this branch and diff'd the files. No difference.
This is probably not exhaustive; anyone have other tests I should run?
I didn't check the
root
stuff in python 2 or 3 since I don't have that on this machine.I also added a github action to test if newly added code is compatible with python3 or not, to ensure we don't have any regression.