#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+--------------------
     Reporter:  kezabelle      |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 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
 
[https://github.com/django/django/blob/c5780adeecfbd85a80b5aa7130dd86e78b23e497/django/middleware/cache.py#L167
 CacheMiddleware], which is in contrast to how the documentation has
 
[https://github.com/django/django/blob/c5780adeecfbd85a80b5aa7130dd86e78b23e497/docs/topics/cache.txt#L437
 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 [https://docs.djangoproject.com/en/dev/internals/deprecation
 /#deprecation-removed-in-1-8 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
 [https://docs.djangoproject.com/en/dev/releases/1.8/ 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
 
[https://github.com/django/django/blob/c5780adeecfbd85a80b5aa7130dd86e78b23e497/django/middleware/cache.py#L206
 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

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.fa29716c06d6ffaec84fa6aca7c7cf5a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to