remove old cruft
add py2 pragma
remove redundant catch
remove redundant code in JSON encoding for python3
use regex to enable pragma: no branch py3