fwrite didn't begin as a way to do write/flush.  the flush was only added recently to make py3 logging less choppy.  It began here: https://github.com/pypa/pip/pull/374  (notice the `b(s)`)
that PR has tests, that should have theoretically failed I guess without that fwrite change,  but that didn't happen in your build.  I would need to look closer to feel ok about removing the `b(s)`, unless you can explain why it's ok.

yes, I'm paranoid too now.  pypa/develop passed 5+ builds after that merge.   so I am very curious what was going on.  I want look into that.