Support Python 2 with fewer warts