Refs #28137 -- Removed HttpRequest.xreadlines() per deprecation timeline.

This commit is contained in:
Tim Graham 2018-12-27 19:58:22 -05:00
parent 8045dff98c
commit 7c66aaa2b6
2 changed files with 2 additions and 9 deletions

View File

@ -1,6 +1,5 @@
import copy import copy
import re import re
import warnings
from io import BytesIO from io import BytesIO
from itertools import chain from itertools import chain
from urllib.parse import quote, urlencode, urljoin, urlsplit from urllib.parse import quote, urlencode, urljoin, urlsplit
@ -15,7 +14,6 @@ from django.http.multipartparser import MultiPartParser, MultiPartParserError
from django.utils.datastructures import ( from django.utils.datastructures import (
CaseInsensitiveMapping, ImmutableList, MultiValueDict, CaseInsensitiveMapping, ImmutableList, MultiValueDict,
) )
from django.utils.deprecation import RemovedInDjango30Warning
from django.utils.encoding import escape_uri_path, iri_to_uri from django.utils.encoding import escape_uri_path, iri_to_uri
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.http import is_same_domain, limited_parse_qsl from django.utils.http import is_same_domain, limited_parse_qsl
@ -354,13 +352,6 @@ class HttpRequest:
def __iter__(self): def __iter__(self):
return iter(self.readline, b'') 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): def readlines(self):
return list(self) return list(self)

View File

@ -242,6 +242,8 @@ to remove usage of these features.
* The ``DEFAULT_CONTENT_TYPE`` setting is removed. * The ``DEFAULT_CONTENT_TYPE`` setting is removed.
* ``HttpRequest.xreadlines()`` is removed.
See :ref:`deprecated-features-2.1` for details on these changes, including how See :ref:`deprecated-features-2.1` for details on these changes, including how
to remove usage of these features. to remove usage of these features.