mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
bpo-9372: Deprecate several __getitem__ methods (GH-8609)
The __getitem__ methods of DOMEventStream, FileInput, and FileWrapper classes ignore their 'index' parameters and return the next item instead.
This commit is contained in:
parent
423d05f6f5
commit
84a13fbda0
12 changed files with 82 additions and 0 deletions
|
|
@ -169,6 +169,9 @@ available for subclassing as well:
|
|||
.. deprecated-removed:: 3.6 3.8
|
||||
The *bufsize* parameter.
|
||||
|
||||
.. deprecated:: 3.8
|
||||
Support for :meth:`__getitem__` method is deprecated.
|
||||
|
||||
|
||||
**Optional in-place filtering:** if the keyword argument ``inplace=True`` is
|
||||
passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, the
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@ also provides these miscellaneous utilities:
|
|||
for chunk in wrapper:
|
||||
print(chunk)
|
||||
|
||||
.. deprecated:: 3.8
|
||||
Support for :meth:`sequence protocol <__getitem__>` is deprecated.
|
||||
|
||||
|
||||
:mod:`wsgiref.headers` -- WSGI response header tools
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ DOMEventStream Objects
|
|||
|
||||
.. class:: DOMEventStream(stream, parser, bufsize)
|
||||
|
||||
.. deprecated:: 3.8
|
||||
Support for :meth:`sequence protocol <__getitem__>` is deprecated.
|
||||
|
||||
.. method:: getEvent()
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,15 @@ Build and C API Changes
|
|||
|
||||
(Contributed by Antoine Pitrou in :issue:`32430`.)
|
||||
|
||||
* The :meth:`__getitem__` methods of :class:`xml.dom.pulldom.DOMEventStream`,
|
||||
:class:`wsgiref.util.FileWrapper` and :class:`fileinput.FileInput` have been
|
||||
deprecated.
|
||||
|
||||
Implementations of these methods have been ignoring their *index* parameter,
|
||||
and returning the next item instead.
|
||||
|
||||
(Contributed by Berker Peksag in :issue:`9372`.)
|
||||
|
||||
|
||||
Deprecated
|
||||
==========
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue