mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
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>
This commit is contained in:
parent
1bddf890e5
commit
ea9835c5d1
4 changed files with 27 additions and 19 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue