Compat.py3

Merging in py3 compatibility updates from Paars and adding pragma: no cover statements for compatibility conditions