Refs #24728 - Removed Atom1Feed/RssFeed mime_type attribute.

Per deprecation timeline.
This commit is contained in:
Tim Graham 2016-12-31 07:10:04 -05:00
parent 3cee9edd1b
commit c6de8cca20
2 changed files with 3 additions and 18 deletions

View File

@ -278,15 +278,6 @@ class RssFeed(SyndicationFeed):
def endChannelElement(self, handler):
handler.endElement("channel")
@property
def mime_type(self):
warnings.warn(
'The mime_type attribute of RssFeed is deprecated. '
'Use content_type instead.',
RemovedInDjango20Warning, stacklevel=2
)
return self.content_type
class RssUserland091Feed(RssFeed):
_version = "0.91"
@ -445,15 +436,6 @@ class Atom1Feed(SyndicationFeed):
if item['item_copyright'] is not None:
handler.addQuickElement("rights", item['item_copyright'])
@property
def mime_type(self):
warnings.warn(
'The mime_type attribute of Atom1Feed is deprecated. '
'Use content_type instead.',
RemovedInDjango20Warning, stacklevel=2
)
return self.content_type
# This isolates the decision of what the system default is, so calling code can
# do "feedgenerator.DefaultFeed" instead of "feedgenerator.Rss201rev2Feed".

View File

@ -288,3 +288,6 @@ these features.
* Support for custom error views that don't accept an ``exception`` parameter
is removed.
* The ``mime_type`` attribute of ``django.utils.feedgenerator.Atom1Feed`` and
``django.utils.feedgenerator.RssFeed`` is removed.