R. David Murray added the comment:
This is off topic for this issue, but what you just reported makes no sense to me. TextIOWrapper calls the encoder corresponding to the specified encoding in its write method.
That said, it is true that the IO docs are currently a class reference and not a user reference, and this should be fixed. There may even already be an open issue for this.