summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorMatthias Bussonnier <mbussonnier@ucmerced.edu>2019-05-20 20:44:11 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-05-20 20:44:11 (GMT)
commit1a3faf9d9740a8c7505c61839ef09929a7ff9e35 (patch)
treebdd3def7859b69fa221e5350842801dd381fdf5c /Doc/library
parent4011d865d0572a3dd9988f2935cd835cc8fb792a (diff)
downloadcpython-1a3faf9d9740a8c7505c61839ef09929a7ff9e35.zip
cpython-1a3faf9d9740a8c7505c61839ef09929a7ff9e35.tar.gz
cpython-1a3faf9d9740a8c7505c61839ef09929a7ff9e35.tar.bz2
bpo-36952: Remove the bufsize parameter in fileinput.input(). (GH-13400)
This parameter is marked as deprecated since 3.6 and for removal in 3.8. It already had no effects.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/fileinput.rst17
1 files changed, 10 insertions, 7 deletions
diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst
index af9dff3..14be492 100644
--- a/Doc/library/fileinput.rst
+++ b/Doc/library/fileinput.rst
@@ -54,7 +54,7 @@ provided by this module.
The following function is the primary interface of this module:
-.. function:: input(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None)
+.. function:: input(files=None, inplace=False, backup='', *, mode='r', openhook=None)
Create an instance of the :class:`FileInput` class. The instance will be used
as global state for the functions of this module, and is also returned to use
@@ -72,8 +72,9 @@ The following function is the primary interface of this module:
.. versionchanged:: 3.2
Can be used as a context manager.
- .. deprecated-removed:: 3.6 3.8
- The *bufsize* parameter.
+ .. versionchanged:: 3.8
+ The keyword parameters *mode* and *openhook* are now keyword-only.
+
The following functions use the global state created by :func:`fileinput.input`;
if there is no active state, :exc:`RuntimeError` is raised.
@@ -135,7 +136,7 @@ The class which implements the sequence behavior provided by the module is
available for subclassing as well:
-.. class:: FileInput(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None)
+.. class:: FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None)
Class :class:`FileInput` is the implementation; its methods :meth:`filename`,
:meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`,
@@ -160,18 +161,20 @@ available for subclassing as well:
with FileInput(files=('spam.txt', 'eggs.txt')) as input:
process(input)
+
.. versionchanged:: 3.2
Can be used as a context manager.
.. deprecated:: 3.4
The ``'rU'`` and ``'U'`` modes.
- .. deprecated-removed:: 3.6 3.8
- The *bufsize* parameter.
-
.. deprecated:: 3.8
Support for :meth:`__getitem__` method is deprecated.
+ .. versionchanged:: 3.8
+ The keyword parameter *mode* and *openhook* are now keyword-only.
+
+
**Optional in-place filtering:** if the keyword argument ``inplace=True`` is
passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, the