py3: catch TypeError during template operations
Two places in this code Python 3 changed from raising ValueError
to TypeError. So catch the addition exceptions.
IMO this code might be better off performing type sniffing. But
I'm not sure the implications of changing that.
Differential Revision: https://phab.mercurial-scm.org/D2156
py3: use bytes literals for test extension
These extensions don't get run through our custom module importer.
It's easy enough to make them dual compatible with Python 2 and 3.
# skip-blame b prefixes
Differential Revision: https://phab.mercurial-scm.org/D2155