diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2021-09-08 10:07:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-08 10:07:40 (GMT) |
commit | d003a5bd2505a7fa04f50504b68ba8fca67349cd (patch) | |
tree | 530dacbc66f083a0ecfcad123bab220cb6796bb5 /Lib/wsgiref/util.py | |
parent | cb15afcccffc6c42cbfb7456ce8db89cd2f77512 (diff) | |
download | cpython-d003a5bd2505a7fa04f50504b68ba8fca67349cd.zip cpython-d003a5bd2505a7fa04f50504b68ba8fca67349cd.tar.gz cpython-d003a5bd2505a7fa04f50504b68ba8fca67349cd.tar.bz2 |
bpo-45132 Remove deprecated __getitem__ methods (GH-28225)
Remove deprecated __getitem__ methods of xml.dom.pulldom.DOMEventStream,
wsgiref.util.FileWrapper and fileinput.FileInput, deprecated since Python 3.9.
Diffstat (limited to 'Lib/wsgiref/util.py')
-rw-r--r-- | Lib/wsgiref/util.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/Lib/wsgiref/util.py b/Lib/wsgiref/util.py index cac52eb..cbbe094 100644 --- a/Lib/wsgiref/util.py +++ b/Lib/wsgiref/util.py @@ -17,19 +17,6 @@ class FileWrapper: if hasattr(filelike,'close'): self.close = filelike.close - def __getitem__(self,key): - import warnings - warnings.warn( - "FileWrapper's __getitem__ method ignores 'key' parameter. " - "Use iterator protocol instead.", - DeprecationWarning, - stacklevel=2 - ) - data = self.filelike.read(self.blksize) - if data: - return data - raise IndexError - def __iter__(self): return self |