summaryrefslogtreecommitdiffstats
path: root/Doc/library/tempfile.rst
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-11-27 13:22:06 (GMT)
committerGitHub <noreply@github.com>2019-11-27 13:22:06 (GMT)
commitea9835c5d154ab6a54eed627958473b6768b28cc (patch)
treee65f74eab9ca75f936121582111232d970aa159c /Doc/library/tempfile.rst
parent1bddf890e595a865414645c6041733043c4081f8 (diff)
downloadcpython-ea9835c5d154ab6a54eed627958473b6768b28cc.zip
cpython-ea9835c5d154ab6a54eed627958473b6768b28cc.tar.gz
cpython-ea9835c5d154ab6a54eed627958473b6768b28cc.tar.bz2
bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)
SpooledTemporaryFile.rollback() might cause data corruption when it is in text mode. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Doc/library/tempfile.rst')
-rw-r--r--Doc/library/tempfile.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index fff7a7a..a59817c 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -105,8 +105,8 @@ The module defines the following user-callable items:
causes the file to roll over to an on-disk file regardless of its size.
The returned object is a file-like object whose :attr:`_file` attribute
- is either an :class:`io.BytesIO` or :class:`io.StringIO` object (depending on
- whether binary or text *mode* was specified) or a true file
+ is either an :class:`io.BytesIO` or :class:`io.TextIOWrapper` object
+ (depending on whether binary or text *mode* was specified) or a true file
object, depending on whether :func:`rollover` has been called. This
file-like object can be used in a :keyword:`with` statement, just like
a normal file.