Re: [Django] #13110: Multiple enclosures per feed's item

37 views
Skip to first unread message

Django

unread,
Nov 18, 2011, 6:21:22 PM11/18/11
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
Type: New feature | jasonkotenko
Component: contrib.syndication | Status: assigned
Severity: Normal | Version: 1.1
Keywords: | Resolution:
Has patch: 0 | Triage Stage: Accepted
Needs tests: 1 | Needs documentation: 1
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* ui_ux: => 0
* easy: => 0
* stage: Design decision needed => Accepted


Comment:

It should be possible to accept either a string or a list of string, and
to validate that there's only one enclosure for RSS feeds.

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 20, 2015, 10:21:14 AM8/20/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| jasonkotenko
Type: New feature | Status: assigned
Component: contrib.syndication | Version: 1.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by unaizalakain):

Replying to [comment:7 aaugustin]:


> It should be possible to accept either a string or a list of string, and
to validate that there's only one enclosure for RSS feeds.

Currently `Feed` builds the `Enclosure` from `item_enclosure_url`,
`item_enclosure_length` and `item_enclosure_mime_type`. Accepting an
optional list for one of them would mean accepting optional lists for the
three of them and that would become quite a strange and cumbersome API.

Instead, I propose creating a `item_enclosures` attr/func (following the
way all the rest are gotten) which, by default, returns a list with a
single `Enclosure` in it. That enclosure would be built using the url,
length and mime_type gotten from the corresponding attrs.

RSS feeds could then validate that `item_enclosures` is no longer than 1.

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:8>

Django

unread,
Aug 21, 2015, 6:07:13 AM8/21/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain

Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 1

Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by unaizalakain):

* keywords: => multiple, enclosures, atom, feed
* cc: unai@… (added)
* has_patch: 0 => 1
* version: 1.1 => master
* owner: jasonkotenko => unaizalakain


--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:9>

Django

unread,
Aug 21, 2015, 6:08:06 AM8/21/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by unaizalakain):

Could something along these lines be enough?
https://github.com/unaizalakain/django/commit/9acc50df64408d4023378ae4259fa1069b215ab2

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:10>

Django

unread,
Aug 27, 2015, 8:32:04 PM8/27/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by unaizalakain):

I updated the commit with the proposed changes and opened a PR:
https://github.com/django/django/pull/5200

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:11>

Django

unread,
Aug 31, 2015, 6:25:30 AM8/31/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MarkusH):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:12>

Django

unread,
Sep 3, 2015, 6:59:16 AM9/3/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by unaizalakain):

* needs_better_patch: 1 => 0
* needs_docs: 1 => 0


Comment:

Updated PR with docs.

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:13>

Django

unread,
Sep 4, 2015, 3:39:47 AM9/4/15
to django-...@googlegroups.com
#13110: Multiple enclosures per feed's item
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by unaizalakain):

* needs_tests: 1 => 0


Comment:

Basic tests added, PR updated, ready for review!

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:14>

Django

unread,
Sep 9, 2015, 3:19:02 PM9/9/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds

-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

I left comments for improvement on the pull request.

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:15>

Django

unread,
Sep 14, 2015, 1:26:20 AM9/14/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by unaizalakain):

* needs_better_patch: 1 => 0


Comment:

PR updated!

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:16>

Django

unread,
Sep 18, 2015, 6:25:59 PM9/18/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Ready for
enclosures, atom, feed | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:17>

Django

unread,
Sep 18, 2015, 6:33:55 PM9/18/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: closed
Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed

Keywords: multiple, | Triage Stage: Ready for
enclosures, atom, feed | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"aac2a2d2ae2486342058db0c72ed7ba2c7c8eb1e" aac2a2d]:
{{{
#!CommitTicketReference repository=""
revision="aac2a2d2ae2486342058db0c72ed7ba2c7c8eb1e"
Fixed #13110 -- Added support for multiple enclosures in Atom feeds.

The ``item_enclosures`` hook returns a list of ``Enclosure`` objects which
is
then used by the feed builder. If the feed is a RSS feed, an exception is
raised as RSS feeds don't allow multiple enclosures per feed item.

The ``item_enclosures`` hook defaults to an empty list or, if the
``item_enclosure_url`` hook is defined, to a list with a single
``Enclosure``
built from the ``item_enclosure_url``, ``item_enclosure_length``, and
``item_enclosure_mime_type`` hooks.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:18>

Django

unread,
Sep 18, 2015, 8:13:17 PM9/18/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: new

Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: closed => new
* keywords: multiple, enclosures, atom, feed => multiple, enclosures,
atom, feed 1.9
* has_patch: 1 => 0
* resolution: fixed =>
* stage: Ready for checkin => Accepted


Comment:

Reopening per comments on the commit.

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:19>

Django

unread,
Sep 19, 2015, 2:13:23 AM9/19/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: new
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by unaizalakain):

* has_patch: 0 => 1


Comment:

Sorry about that…
New PR: https://github.com/django/django/pull/5315

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:20>

Django

unread,
Sep 19, 2015, 11:23:32 AM9/19/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: new
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Unai Zalakain <unai@…>):

In [changeset:"a4b80e242162a7d6ac2337a2a621a82027c549b7" a4b80e24]:
{{{
#!CommitTicketReference repository=""
revision="a4b80e242162a7d6ac2337a2a621a82027c549b7"
Refs #13110 -- Fixed mistakes in the new multiple enclosure feed tests
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:21>

Django

unread,
Sep 19, 2015, 11:24:05 AM9/19/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: closed
Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed

Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:22>

Django

unread,
Dec 17, 2015, 9:10:02 AM12/17/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: closed
Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"2ec23a3d41be2ba5df9f46b17e0a05eb1b051c41" 2ec23a3d]:
{{{
#!CommitTicketReference repository=""
revision="2ec23a3d41be2ba5df9f46b17e0a05eb1b051c41"
Refs #13110 -- Fixed typo in Feed class reference.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:23>

Django

unread,
Dec 17, 2015, 9:10:07 AM12/17/15
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner:
| unaizalakain
Type: New feature | Status: closed
Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"54295a95d9b34dadb17054b88d43b2b769ccc0f3" 54295a95]:
{{{
#!CommitTicketReference repository=""
revision="54295a95d9b34dadb17054b88d43b2b769ccc0f3"
[1.9.x] Refs #13110 -- Fixed typo in Feed class reference.

Backport of 2ec23a3d41be2ba5df9f46b17e0a05eb1b051c41 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:24>

Django

unread,
Jan 17, 2017, 10:09:51 PM1/17/17
to django-...@googlegroups.com
#13110: Allow multiple enclosures in Atom feeds
-------------------------------------+-------------------------------------
Reporter: Piaume | Owner: Unai
| Zalakain

Type: New feature | Status: closed
Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed
Keywords: multiple, | Triage Stage: Accepted
enclosures, atom, feed 1.9 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"75cf9b5ac031feb8f94271c9906157c921a14520" 75cf9b5a]:
{{{
#!CommitTicketReference repository=""
revision="75cf9b5ac031feb8f94271c9906157c921a14520"
Refs #13110 -- Removed SyndicationFeed.add_item()'s enclosure argument.

Per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/13110#comment:25>

Reply all
Reply to author
Forward
0 new messages