summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-12-27 19:58:22 -0500
committerTim Graham <timograham@gmail.com>2019-01-17 10:52:16 -0500
commit7c66aaa2b6a427fc85131c97cbf6c816c2f07aa0 (patch)
tree40d60285e904732d1c33a308711efe5f0ec750b1
parent8045dff98c2533e7e99ce82f80292fc6f3bb7e1f (diff)
Refs #28137 -- Removed HttpRequest.xreadlines() per deprecation timeline.
-rw-r--r--django/http/request.py9
-rw-r--r--docs/releases/3.0.txt2
2 files changed, 2 insertions, 9 deletions
diff --git a/django/http/request.py b/django/http/request.py
index 02a127d664..f1c232d89a 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -1,6 +1,5 @@
import copy
import re
-import warnings
from io import BytesIO
from itertools import chain
from urllib.parse import quote, urlencode, urljoin, urlsplit
@@ -15,7 +14,6 @@ from django.http.multipartparser import MultiPartParser, MultiPartParserError
from django.utils.datastructures import (
CaseInsensitiveMapping, ImmutableList, MultiValueDict,
)
-from django.utils.deprecation import RemovedInDjango30Warning
from django.utils.encoding import escape_uri_path, iri_to_uri
from django.utils.functional import cached_property
from django.utils.http import is_same_domain, limited_parse_qsl
@@ -354,13 +352,6 @@ class HttpRequest:
def __iter__(self):
return iter(self.readline, b'')
- def xreadlines(self):
- warnings.warn(
- 'HttpRequest.xreadlines() is deprecated in favor of iterating the '
- 'request.', RemovedInDjango30Warning, stacklevel=2,
- )
- yield from self
-
def readlines(self):
return list(self)
diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt
index ac69ab8714..9b2df51f6f 100644
--- a/docs/releases/3.0.txt
+++ b/docs/releases/3.0.txt
@@ -242,6 +242,8 @@ to remove usage of these features.
* The ``DEFAULT_CONTENT_TYPE`` setting is removed.
+* ``HttpRequest.xreadlines()`` is removed.
+
See :ref:`deprecated-features-2.1` for details on these changes, including how
to remove usage of these features.