Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#24099 closed Cleanup/optimization (fixed)

Remove ContentType.name

Reported by: Claude Paroz Owned by: nobody
Component: contrib.contenttypes Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (8)

comment:1 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

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

comment:2 by Claude Paroz, 9 years ago

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.

comment:3 by Tim Graham, 9 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:4 by Claude Paroz, 9 years ago

Triage Stage: Ready for checkinAccepted

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?

comment:5 by Tim Graham, 9 years ago

Patch needs improvement: set

comment:6 by Tim Graham, 9 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:7 by Markus Holtermann <info@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 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.

comment:8 by Tim Graham <timograham@…>, 9 years ago

In 75374d3:

Refs #24099 -- Removed compatibility shim for ContentType.name field.

Note: See TracTickets for help on using tickets.
Back to Top