summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorsth <sth.dev@tejp.de>2018-05-23 05:07:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-05-23 05:07:01 (GMT)
commit825aab95fde959541859383f8ea7e7854ebfd49f (patch)
tree727aafb15e3d3054ccd279f732b715aae74f899d /Doc/library
parent0e61dffdbaf39ac5916ce431ff3b37db8faa1d2d (diff)
downloadcpython-825aab95fde959541859383f8ea7e7854ebfd49f.zip
cpython-825aab95fde959541859383f8ea7e7854ebfd49f.tar.gz
cpython-825aab95fde959541859383f8ea7e7854ebfd49f.tar.bz2
bpo-27300: Add the errors parameter to tempfile classes. (GH-6696)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/tempfile.rst17
1 files changed, 13 insertions, 4 deletions
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index c59aca1..79914e1 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -31,7 +31,7 @@ is recommended to use keyword arguments for clarity.
The module defines the following user-callable items:
-.. function:: TemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None)
+.. function:: TemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
Return a :term:`file-like object` that can be used as a temporary storage area.
The file is created securely, using the same rules as :func:`mkstemp`. It will be destroyed as soon
@@ -49,7 +49,7 @@ The module defines the following user-callable items:
The *mode* parameter defaults to ``'w+b'`` so that the file created can
be read and written without being closed. Binary mode is used so that it
behaves consistently on all platforms without regard for the data that is
- stored. *buffering*, *encoding* and *newline* are interpreted as for
+ stored. *buffering*, *encoding*, *errors* and *newline* are interpreted as for
:func:`open`.
The *dir*, *prefix* and *suffix* parameters have the same meaning and
@@ -66,8 +66,11 @@ The module defines the following user-callable items:
The :py:data:`os.O_TMPFILE` flag is now used if available.
+ .. versionchanged:: 3.8
+ Added *errors* parameter.
-.. function:: NamedTemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None, delete=True)
+
+.. function:: NamedTemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None, delete=True, *, errors=None)
This function operates exactly as :func:`TemporaryFile` does, except that
the file is guaranteed to have a visible name in the file system (on
@@ -82,8 +85,11 @@ The module defines the following user-callable items:
attribute is the underlying true file object. This file-like object can
be used in a :keyword:`with` statement, just like a normal file.
+ .. versionchanged:: 3.8
+ Added *errors* parameter.
+
-.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None)
+.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
This function operates exactly as :func:`TemporaryFile` does, except that
data is spooled in memory until the file size exceeds *max_size*, or
@@ -104,6 +110,9 @@ The module defines the following user-callable items:
.. versionchanged:: 3.3
the truncate method now accepts a ``size`` argument.
+ .. versionchanged:: 3.8
+ Added *errors* parameter.
+
.. function:: TemporaryDirectory(suffix=None, prefix=None, dir=None)