Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#15217 closed (fixed)

Cache setting deprecation warning is too aggressive

Reported by: Adam Vandenberg Owned by: nobody
Component: Core (Cache system) Version: master
Severity: Keywords: blocker
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I have Django project with no CACHES or CACHE_FOO settings in my So I'm relying entirely on whatever is in the for these values (and CACHES={} here.)

The line 77 above says that if CACHES is not true, print a deprecation warning.

Thus, since I'm not setting anything up here, and CACHES is false in, I see this deprecation warning any time I run my app-specific unit tests.

The "default settings" should cause no pending deprecation error to be printed when the project itself isn't setting up any cache settings.

Change History (5)

comment:1 Changed 6 years ago by Russell Keith-Magee

Keywords: blocker added
milestone: 1.3
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Agreed that we shouldn't be raising an warning if the user hasn't done something that requires attention. This is a problem with a new feature, so it's a blocker.

comment:2 Changed 6 years ago by Adam Vandenberg

For completeness, I run my app tests like "python -Wall <appname>"; I believe the -Wall is what makes this warning visible.

comment:3 Changed 6 years ago by Russell Keith-Magee

@adamv - Sure; but that's only because it's a PendingDeprecationWarning. Come Django 1.4, it will be a full warning, and a whole lot more annoying.

comment:4 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

In [15406]:

Fixed #15217 -- Made the CACHE_BACKEND deprecation warning more selective, so it doesn't catch the default case. Thanks to adamv for the report.

comment:5 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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