summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2021-09-08 10:07:40 (GMT)
committerGitHub <noreply@github.com>2021-09-08 10:07:40 (GMT)
commitd003a5bd2505a7fa04f50504b68ba8fca67349cd (patch)
tree530dacbc66f083a0ecfcad123bab220cb6796bb5 /Lib/xml
parentcb15afcccffc6c42cbfb7456ce8db89cd2f77512 (diff)
downloadcpython-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/xml')
-rw-r--r--Lib/xml/dom/pulldom.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index 96a8d59..913141c 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -216,19 +216,6 @@ class DOMEventStream:
self.parser.setFeature(xml.sax.handler.feature_namespaces, 1)
self.parser.setContentHandler(self.pulldom)
- def __getitem__(self, pos):
- import warnings
- warnings.warn(
- "DOMEventStream's __getitem__ method ignores 'pos' parameter. "
- "Use iterator protocol instead.",
- DeprecationWarning,
- stacklevel=2
- )
- rc = self.getEvent()
- if rc:
- return rc
- raise IndexError
-
def __next__(self):
rc = self.getEvent()
if rc: