#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 , 11 years ago
| Easy pickings: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Bug |
comment:2 by , 11 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 11 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:4 by , 11 years ago
| Has patch: | set |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Ready for checkin → Accepted |
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 , 11 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 , 11 years ago
| Patch needs improvement: | unset |
|---|
comment:7 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Made the changes to 1.8.txt and also deprecation.txt on my [bug branch https://github.com/kenkam/django/tree/ticket_23762]