This is actually pycompat.open(), so it need bytes. It regressed recently on
default.
VSCode flagged some invalid mode to open() the other day, but I don't remember
where. That's what got me searching in this area. I'm almost certain that it
was the other way (i.e. saying open doesn't take bytes), but I can't find that
now.