summaryrefslogtreecommitdiffstats
path: root/Lib/wsgiref/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/wsgiref/util.py')
-rw-r--r--Lib/wsgiref/util.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/wsgiref/util.py b/Lib/wsgiref/util.py
index 516fe89..1cff7a3 100644
--- a/Lib/wsgiref/util.py
+++ b/Lib/wsgiref/util.py
@@ -18,6 +18,13 @@ class FileWrapper:
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