@@ -42,7 +42,8 @@ def __init__(self, content_type=None, status=None, mimetype=None):
4242 self ._closable_objects = []
4343 if mimetype :
4444 warnings .warn ("Using mimetype keyword argument is deprecated, use"
45- " content_type instead" , PendingDeprecationWarning )
45+ " content_type instead" ,
46+ DeprecationWarning , stacklevel = 2 )
4647 content_type = mimetype
4748 if not content_type :
4849 content_type = "%s; charset=%s" % (settings .DEFAULT_CONTENT_TYPE ,
@@ -296,7 +297,7 @@ def __iter__(self):
296297 'Creating streaming responses with `HttpResponse` is '
297298 'deprecated. Use `StreamingHttpResponse` instead '
298299 'if you need the streaming behavior.' ,
299- PendingDeprecationWarning , stacklevel = 2 )
300+ DeprecationWarning , stacklevel = 2 )
300301 if not hasattr (self , '_iterator' ):
301302 self ._iterator = iter (self ._container )
302303 return self
@@ -352,14 +353,14 @@ class CompatibleStreamingHttpResponse(StreamingHttpResponse):
352353
353354 These responses will stream only if no middleware attempts to access the
354355 `content` attribute. Otherwise, they will behave like a regular response,
355- and raise a `PendingDeprecationWarning `.
356+ and raise a `DeprecationWarning `.
356357 """
357358 @property
358359 def content (self ):
359360 warnings .warn (
360361 'Accessing the `content` attribute on a streaming response is '
361362 'deprecated. Use the `streaming_content` attribute instead.' ,
362- PendingDeprecationWarning )
363+ DeprecationWarning , stacklevel = 2 )
363364 content = b'' .join (self )
364365 self .streaming_content = [content ]
365366 return content
@@ -369,7 +370,7 @@ def content(self, content):
369370 warnings .warn (
370371 'Accessing the `content` attribute on a streaming response is '
371372 'deprecated. Use the `streaming_content` attribute instead.' ,
372- PendingDeprecationWarning )
373+ DeprecationWarning , stacklevel = 2 )
373374 self .streaming_content = [content ]
374375
375376
0 commit comments