buffering=0 is not a legal value for non-binary files on Py3