[Django] #24099: Remove ContentType.name

32 views
Skip to first unread message

Django

unread,
Jan 8, 2015, 11:16:38 AM1/8/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
------------------------------------------------+------------------------
Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Work has been done in #16803 to deprecate the denormalized hardcoded
`ContentType.name` field, but the final deprecation was depending on a
schema migration framework. I think it's now time to finish that task and
finally remove the field.

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

Django

unread,
Jan 8, 2015, 11:32:27 AM1/8/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | 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):

* stage: Unreviewed => Accepted


Comment:

Do you think this needs a deprecation cycle in some way?

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

Django

unread,
Jan 8, 2015, 11:41:11 AM1/8/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | 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 claudep):

See the proposed PR: https://github.com/django/django/pull/3858

Passing the `name` field when creating a ContentType is still allowed, but
the field is simply discarded and a warning is emitted. I think that it's
important to allow for example for existing fixtures to still be used.
Hopefully this deprecation strategy will be enough, usage will tell.

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

Django

unread,
Jan 8, 2015, 6:58:56 PM1/8/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: | Version: master
contrib.contenttypes |
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):

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


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

Django

unread,
Jan 9, 2015, 3:10:59 AM1/9/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | 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 claudep):

* stage: Ready for checkin => Accepted


Comment:

The migration is not reversible because the `name` field is not nullable.
I don't think this is acceptable. Does someone know about a workaround?
Should we add an intermediary migration?

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

Django

unread,
Jan 12, 2015, 1:29:48 PM1/12/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
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


--
Ticket URL: <https://code.djangoproject.com/ticket/24099#comment:5>

Django

unread,
Jan 16, 2015, 2:24:50 PM1/16/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: | Version: master
contrib.contenttypes |
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):

* needs_better_patch: 1 => 0


* stage: Accepted => Ready for checkin


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

Django

unread,
Jan 16, 2015, 2:25:37 PM1/16/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: | Version: master
contrib.contenttypes |
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 Markus Holtermann <info@…>):

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


Comment:

In [changeset:"b4ac23290772e0c11379eb2dfb81c750b7052b66"]:
{{{
#!CommitTicketReference repository=""
revision="b4ac23290772e0c11379eb2dfb81c750b7052b66"
Fixed #24099 -- Removed contenttype.name deprecated field

This finsishes the work started on #16803.
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
}}}

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

Django

unread,
Sep 23, 2015, 7:54:47 PM9/23/15
to django-...@googlegroups.com
#24099: Remove ContentType.name
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody

Type: | Status: closed
Cleanup/optimization |
Component: | Version: master
contrib.contenttypes |
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:"75374d3797c2cd2423982a870bb0bc74821e951f" 75374d3]:
{{{
#!CommitTicketReference repository=""
revision="75374d3797c2cd2423982a870bb0bc74821e951f"
Refs #24099 -- Removed compatibility shim for ContentType.name field.
}}}

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

Reply all
Reply to author
Forward
0 new messages