Opened 9 years ago

Closed 9 years ago

#26089 closed Bug (fixed)

Remove auth's custom user test models (their tables aren't created since Django 1.8)

Reported by: Simon Charette Owned by: Simon Charette
Component: contrib.auth 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

Since the introduction of contrib application migrations in 1.8 (#22170) the documented custom user test models table are not created anymore because they are registered to the 'auth' labeled application but are not part of its shipped migrations.

Based on the fact this was not reported before and that the only uses of ExtensionUser I can find is either from a vendored version of Django or a copy-pasta of the documentation suggested usage I think we can safely assume it's not commonly used among third-party application who claim to support custom user models. I'll make sure to post the mailing list in order to gather feedback from the community about this point.

Given the models are simply not usable on 1.8 and 1.9 now I'd like to start the deprecation in 1.8 in order order to be able to completely remove them on master but if it's not considered safe enough I came up with a with a workaround that could be backported since there's still no documented way to ship test only models (#7835).

If these models are relied on by the community I would suggest we start deprecating them in 1.10 and adjust the documentation to suggest subclassing the provided abstract models instead.

Change History (11)

comment:1 by Tim Graham, 9 years ago

I've written to django-developers with my take on it.

comment:2 by Tim Graham, 9 years ago

Severity: Release blockerNormal

comment:3 by Tim Graham, 9 years ago

Has patch: set

My PR for documentation removal of the broken models (to be backported to 1.8).
Simon's PR for removing the models from the public API.

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

In 1e915044:

Refs #26089 -- Removed obsolete docs about custom user model testing.

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

In ea2d9f0:

[1.8.x] Refs #26089 -- Removed obsolete docs about custom user model testing.

Backport of 1e9150443e5696d764ed81c97b53ef0365a5d854 from master

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

In 194bf8c:

[1.9.x] Refs #26089 -- Removed obsolete docs about custom user model testing.

Backport of 1e9150443e5696d764ed81c97b53ef0365a5d854 from master

comment:7 by Tim Graham, 9 years ago

Needs documentation: set

PR needs a mention in the 1.10 release notes just be on the safe side.

comment:8 by Simon Charette, 9 years ago

Needs documentation: unset
Status: newassigned
Version: 1.8master

Here's the PR with release notes.

comment:9 by Tim Graham, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:10 by Tim Graham, 9 years ago

Summary: The auth custom test model tables are not created anymore.Remove auth's custom user test models (their tables aren't created since Django 1.8)

comment:11 by Simon Charette <charette.s@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 6eb3ce11:

Fixed #26089 -- Removed custom user test models from public API.

Thanks to Tim Graham for the review.

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