Python 3 support through a compat module