[Django] #23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial

7 views
Skip to first unread message

Django

unread,
Nov 5, 2014, 3:25:41 AM11/5/14
to django-...@googlegroups.com
#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.

Django

unread,
Nov 5, 2014, 8:53:17 AM11/5/14
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* easy: 0 => 1
* needs_docs: => 0
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:1>

Django

unread,
Feb 22, 2015, 6:51:10 AM2/22/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by kenkam):

* status: new => assigned
* owner: nobody => kenkam


--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:2>

Django

unread,
Feb 22, 2015, 1:04:56 PM2/22/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------------+-------------------------------------

Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by kenkam):

* stage: Accepted => Ready for checkin


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:3>

Django

unread,
Feb 22, 2015, 1:41:27 PM2/22/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------

Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* stage: Ready for checkin => Accepted


Comment:

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!

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:4>

Django

unread,
Feb 22, 2015, 2:22:53 PM2/22/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by kenkam):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:5>

Django

unread,
Feb 22, 2015, 2:23:24 PM2/22/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by kenkam):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:6>

Django

unread,
Feb 23, 2015, 9:23:43 AM2/23/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"e83aba0e2cce16cd1b32d1c172239a4e20867e95"]:
{{{
#!CommitTicketReference repository=""
revision="e83aba0e2cce16cd1b32d1c172239a4e20867e95"
Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation in
docs
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:7>

Django

unread,
Feb 23, 2015, 9:24:37 AM2/23/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"778ccee9bc83f986dc4b395a22c86de9bad88af7"]:
{{{
#!CommitTicketReference repository=""
revision="778ccee9bc83f986dc4b395a22c86de9bad88af7"
[1.6.x] Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY
deprecation in docs

Backport of e83aba0e2cce16cd1b32d1c172239a4e20867e95 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:8>

Django

unread,
Feb 23, 2015, 9:24:40 AM2/23/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"6e8f42cfc7002dc8471baa9573da3e9b52006230"]:
{{{
#!CommitTicketReference repository=""
revision="6e8f42cfc7002dc8471baa9573da3e9b52006230"
[1.7.x] Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY
deprecation in docs

Backport of e83aba0e2cce16cd1b32d1c172239a4e20867e95 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:9>

Django

unread,
Feb 23, 2015, 9:24:44 AM2/23/15
to django-...@googlegroups.com
#23762: CACHE_MIDDLEWARE_ANONYMOUS_ONLY deprecation period was only partial
-------------------------------+------------------------------------
Reporter: kezabelle | Owner: kenkam
Type: Bug | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"a752a2c951d1836a8f58452b499974ff3742ee16"]:
{{{
#!CommitTicketReference repository=""
revision="a752a2c951d1836a8f58452b499974ff3742ee16"
[1.8.x] Fixed #23762 -- clarified CACHE_MIDDLEWARE_ANONYMOUS_ONLY
deprecation in docs

Backport of e83aba0e2cce16cd1b32d1c172239a4e20867e95 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23762#comment:10>

Reply all
Reply to author
Forward
0 new messages