summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-31 08:27:32 -0500
committerTim Graham <timograham@gmail.com>2017-01-17 20:52:01 -0500
commit75cf9b5ac031feb8f94271c9906157c921a14520 (patch)
tree51061671e97c44a71f080329497f5afb49b95585 /django/utils
parentd67a46e10459858b681176a3e1f8c6bca39d2ac7 (diff)
Refs #13110 -- Removed SyndicationFeed.add_item()'s enclosure argument.
Per deprecation timeline.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/feedgenerator.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index a27eb1f2e9..d8a932b020 100644
--- a/django/utils/feedgenerator.py
+++ b/django/utils/feedgenerator.py
@@ -24,10 +24,8 @@ http://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004/
from __future__ import unicode_literals
import datetime
-import warnings
from django.utils import datetime_safe, six
-from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text, iri_to_uri
from django.utils.six import StringIO
from django.utils.six.moves.urllib.parse import urlparse
@@ -119,9 +117,8 @@ class SyndicationFeed(object):
def add_item(self, title, link, description, author_email=None,
author_name=None, author_link=None, pubdate=None, comments=None,
- unique_id=None, unique_id_is_permalink=None, enclosure=None,
- categories=(), item_copyright=None, ttl=None, updateddate=None,
- enclosures=None, **kwargs):
+ unique_id=None, unique_id_is_permalink=None, categories=(),
+ item_copyright=None, ttl=None, updateddate=None, enclosures=None, **kwargs):
"""
Adds an item to the feed. All args are expected to be Python Unicode
objects except pubdate and updateddate, which are datetime.datetime
@@ -135,16 +132,6 @@ class SyndicationFeed(object):
if ttl is not None:
# Force ints to unicode
ttl = force_text(ttl)
- if enclosure is None:
- enclosures = [] if enclosures is None else enclosures
- else:
- warnings.warn(
- "The enclosure keyword argument is deprecated, "
- "use enclosures instead.",
- RemovedInDjango20Warning,
- stacklevel=2,
- )
- enclosures = [enclosure]
item = {
'title': to_unicode(title),
'link': iri_to_uri(link),