[issue8399] Document os.open

anatoly techtonik report at bugs.python.org
Wed Apr 14 20:53:48 CEST 2010


anatoly techtonik <techtonik at gmail.com> added the comment:

On Unix all files are opened in binary mode. On Windows linefeeds are translated to CRLF corrupting files that are meant to be binary. This is the reason of HgGit failure - it uses Dulwich library that creates corrupted Git index file, because on Windows it is opened without os.O_BINARY flag. Developers do not know anything about it, because they develop on Unix. This could be prevented if we supply a note about how to preserve crossplatform behavior.
https://bugs.edge.launchpad.net/dulwich/+bug/557585

I've attached a patch that adds required note. Please revise it. It should clearly apply over your changes in r80069. I reworded description towards Python users without C background, but I am still worried that they need a POSIX background to understand umask part.

----------
keywords: +patch
status: closed -> open
Added file: http://bugs.python.org/file16924/8399.os-open-default-behavior.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8399>
_______________________________________


More information about the Python-bugs-list mailing list