changeset: 71498:e75715f27ce7 branch: 2.7 parent: 71493:33be4896003a user: Ross Lagerwall date: Mon Jul 25 07:23:58 2011 +0200 files: Doc/ACKS.txt Doc/library/mmap.rst Misc/NEWS description: Issue #12102: Document that buffered files must be flushed before being used with mmap. Patch by Steffen Daode Nurpmeso. diff -r 33be4896003a -r e75715f27ce7 Doc/ACKS.txt --- a/Doc/ACKS.txt Sun Jul 24 22:33:35 2011 +0200 +++ b/Doc/ACKS.txt Mon Jul 25 07:23:58 2011 +0200 @@ -141,6 +141,7 @@ * Sjoerd Mullender * Dale Nagata * Michal Nowikowski + * Steffen Daode Nurpmeso * Ng Pheng Siong * Koray Oner * Tomas Oppelstrup diff -r 33be4896003a -r e75715f27ce7 Doc/library/mmap.rst --- a/Doc/library/mmap.rst Sun Jul 24 22:33:35 2011 +0200 +++ b/Doc/library/mmap.rst Mon Jul 25 07:23:58 2011 +0200 @@ -23,6 +23,12 @@ :func:`os.open` function, which returns a file descriptor directly (the file still needs to be closed when done). +.. note:: + If you want to create a memory-mapping for a writable, buffered file, you + should :func:`~io.IOBase.flush` the file first. This is necessary to ensure + that local modifications to the buffers are actually available to the + mapping. + For both the Unix and Windows versions of the constructor, *access* may be specified as an optional keyword parameter. *access* accepts one of three values: :const:`ACCESS_READ`, :const:`ACCESS_WRITE`, or :const:`ACCESS_COPY` diff -r 33be4896003a -r e75715f27ce7 Misc/NEWS --- a/Misc/NEWS Sun Jul 24 22:33:35 2011 +0200 +++ b/Misc/NEWS Mon Jul 25 07:23:58 2011 +0200 @@ -37,6 +37,9 @@ Library ------- +- Issue #12102: Document that buffered files must be flushed before being used + with mmap. Patch by Steffen Daode Nurpmeso. + - Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling. - Issue #1813: Fix codec lookup and setting/getting locales under Turkish

AltStyle によって変換されたページ (->オリジナル) /