summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2011-07-25 05:23:58 (GMT)
committerRoss Lagerwall <rosslagerwall@gmail.com>2011-07-25 05:23:58 (GMT)
commit528c4adc0be4ca043b11fae945a69f8b392a376b (patch)
tree3c5d9bd6a1854351df2c61c6804ab0552638c0f6
parent3de8c73d90f5aaf8ea8d93af49f88950b02de8e6 (diff)
downloadcpython-528c4adc0be4ca043b11fae945a69f8b392a376b.zip
cpython-528c4adc0be4ca043b11fae945a69f8b392a376b.tar.gz
cpython-528c4adc0be4ca043b11fae945a69f8b392a376b.tar.bz2
Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
-rw-r--r--Doc/ACKS.txt1
-rw-r--r--Doc/library/mmap.rst6
-rw-r--r--Misc/NEWS3
3 files changed, 10 insertions, 0 deletions
diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt
index 58896b0..774192e 100644
--- a/Doc/ACKS.txt
+++ b/Doc/ACKS.txt
@@ -141,6 +141,7 @@ docs@python.org), and we'll be glad to correct the problem.
* Sjoerd Mullender
* Dale Nagata
* Michal Nowikowski
+ * Steffen Daode Nurpmeso
* Ng Pheng Siong
* Koray Oner
* Tomas Oppelstrup
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index f036a60..55861f9 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -23,6 +23,12 @@ file object, use its :meth:`fileno` method to obtain the correct value for the
: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 --git a/Misc/NEWS b/Misc/NEWS
index 9f18a61..6e7bc53 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@ Core and Builtins
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