Initial python 3x syntax changes - ignoring test_views for now