From c6de8cca208fb471723619970c09ecb3bd335362 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 31 Dec 2016 07:10:04 -0500 Subject: [PATCH] Refs #24728 - Removed Atom1Feed/RssFeed mime_type attribute. Per deprecation timeline. --- django/utils/feedgenerator.py | 18 ------------------ docs/releases/2.0.txt | 3 +++ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index c9c1e787f8..a27eb1f2e9 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -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". diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index aec9e91392..348572a75f 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -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.