Make backport_pr work on Python 3

This turned out to be pretty easy.