Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#23762 closed Bug (fixed)

CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial

Reported by: Keryn Knight Owned by: Kenneth Kam
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: django@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

As far as I can tell, the standard 2-versions deprecation policy was only partially implemented for the CACHE_MIDDLEWARE_ANONYMOUS_ONLY setting, because as of Django 1.7.1, the deprecation warning is only applied to CacheMiddleware, which is in contrast to how the documentation has recommended using the two partial Middlewares for a long time, due to the way MIDDLEWARE_CLASSES is applied in different orders depending on the point in the request/response cycle.

As it's already gone in 1.8, the best course of action would be improve the deprecation notes for 1.8 in a way that really calls attention to this omission (rather than the one-line bullet point it currently receieves), as well as add some sort of notification to the release notes, lest it be missed - failure to do so would lead to many people wondering why the setting doesn't work anymore [for which the answer needs to be "read #15201"]

Meanwhile, while asking about making this ticket vs. re-opening #15201 in #django-dev, MarkusH suggested that the stack level for the warning should be 2, not 1.

Marking as master (current 1.8) for the purposes of updating the documentation, though the missing warning can only apply as far as 1.7

Change History (10)

comment:1 by Tim Graham, 9 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:2 by Kenneth Kam, 9 years ago

Owner: changed from nobody to Kenneth Kam
Status: newassigned

comment:3 by Kenneth Kam, 9 years ago

Triage Stage: AcceptedReady for checkin

Made the changes to 1.8.txt and also deprecation.txt on my [bug branch https://github.com/kenkam/django/tree/ticket_23762]

comment:4 by Tim Graham, 9 years ago

Has patch: set
Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

After writing a patch, the next step is to check "Has patch". Then a reviewer will mark a ticket "Ready for Checkin" if the patch looks good. In this case, we should also clarify the deprecation note in the 1.6 release note so I'm marking "Patch needs improvement". Please uncheck when you update the patch, thanks!

comment:5 by Kenneth Kam, 9 years ago

Fair point about the marking the patch incorrectly -- apologies. I have made the changes to 1.6.txt in the same bug branch.

comment:6 by Kenneth Kam, 9 years ago

Patch needs improvement: unset

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

Resolution: fixed
Status: assignedclosed

In e83aba0e2cce16cd1b32d1c172239a4e20867e95:

Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation in docs

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

In 778ccee9bc83f986dc4b395a22c86de9bad88af7:

[1.6.x] Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation in docs

Backport of e83aba0e2cce16cd1b32d1c172239a4e20867e95 from master

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

In 6e8f42cfc7002dc8471baa9573da3e9b52006230:

[1.7.x] Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation in docs

Backport of e83aba0e2cce16cd1b32d1c172239a4e20867e95 from master

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

In a752a2c951d1836a8f58452b499974ff3742ee16:

[1.8.x] Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation in docs

Backport of e83aba0e2cce16cd1b32d1c172239a4e20867e95 from master

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