Compatibility with python 2.7, Pypy and Pypy3