I've mostly used try/except. However, the `io` module does exist in Python 2.7, but `io.StringIO` doesn't behave as we want it to (it's strict about unicode - which is a good thing, but our Python 2 code isn't written for that). So I've had to use `if PY3:` for that.

I could switch to using `if PY3:` for all imports, if we prefer. I'm fairly ambivalent about it.

I've tried to leave searchable comments in these places, though I may have missed some.