[Django] #24728: feedgenerator classes still use "mime_type" instead of "content_type"

16 views
Skip to first unread message

Django

unread,
Apr 29, 2015, 1:05:59 PM4/29/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
-------------------------------+--------------------
Reporter: yourcelf | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
The `mimetype` argument to `HttpResponse` and others was deprecated in
v1.5 and removed in v1.7 in favor of `content_type` to be more
semantically aligned with the HTTP header it represents. However, the
feedgenerator classes `django.utils.feedgenerator.RssFeed` and
`django.utils.feedgenerator.Atom1Feed` still use a `mime_type` attribute.

This leads to slightly ungainly semantics like:

{{{#!python
response = HttpResponse(content_type=feed.mime_type)
}}}

Might be aesthetically nicer to make this more consistent by using
`content_type` across the board.

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

Django

unread,
Apr 29, 2015, 1:20:45 PM4/29/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
--------------------------------------+------------------------------------
Reporter: yourcelf | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* component: Uncategorized => contrib.syndication
* needs_tests: => 0
* version: 1.8 => master
* needs_docs: => 0
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

Yes, but of course a deprecation of the current names is required. See
[https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/submitting-patches/#deprecating-a-feature Deprecating a Feature] for a
checklist of things to do when writing the patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/24728#comment:1>

Django

unread,
Jun 4, 2015, 9:53:49 AM6/4/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
--------------------------------------+------------------------------------
Reporter: yourcelf | Owner: raphaelm
Type: Cleanup/optimization | Status: assigned

Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: new => assigned
* owner: nobody => raphaelm


--
Ticket URL: <https://code.djangoproject.com/ticket/24728#comment:2>

Django

unread,
Jun 4, 2015, 10:03:19 AM6/4/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
--------------------------------------+------------------------------------
Reporter: yourcelf | Owner: raphaelm
Type: Cleanup/optimization | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by raphaelm):

I renamed the attributes and started the deprecation in this pull request:
https://github.com/django/django/pull/4760

--
Ticket URL: <https://code.djangoproject.com/ticket/24728#comment:3>

Django

unread,
Jun 4, 2015, 10:03:31 AM6/4/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
--------------------------------------+------------------------------------
Reporter: yourcelf | Owner: raphaelm
Type: Cleanup/optimization | Status: assigned
Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/24728#comment:4>

Django

unread,
Jun 4, 2015, 12:00:56 PM6/4/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
-------------------------------------+-------------------------------------
Reporter: yourcelf | Owner: raphaelm
Type: | Status: assigned
Cleanup/optimization |

Component: contrib.syndication | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| 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/24728#comment:5>

Django

unread,
Jun 4, 2015, 1:25:17 PM6/4/15
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
-------------------------------------+-------------------------------------
Reporter: yourcelf | Owner: raphaelm
Type: | Status: closed

Cleanup/optimization |
Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| 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:"5c125f63f77e169a459c11bab0f639c83fabc6e2" 5c125f6]:
{{{
#!CommitTicketReference repository=""
revision="5c125f63f77e169a459c11bab0f639c83fabc6e2"
Fixed #24728 -- Renamed mime_type to content_type for syndication feeds

Renamed the mime_type properties of RssFeed and Atom1Feed to
content_type and start deprecation for the old names.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24728#comment:6>

Django

unread,
Jan 17, 2017, 10:09:51 PM1/17/17
to django-...@googlegroups.com
#24728: feedgenerator classes still use "mime_type" instead of "content_type"
-------------------------------------+-------------------------------------
Reporter: Charlie DeTar | Owner: Raphael
Type: | Michel
Cleanup/optimization | Status: closed

Component: contrib.syndication | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
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:"c6de8cca208fb471723619970c09ecb3bd335362" c6de8cc]:
{{{
#!CommitTicketReference repository=""
revision="c6de8cca208fb471723619970c09ecb3bd335362"
Refs #24728 - Removed Atom1Feed/RssFeed mime_type attribute.

Per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24728#comment:7>

Reply all
Reply to author
Forward
0 new messages