Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#15217 closed (fixed)

Cache setting deprecation warning is too aggressive

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

Description

http://code.djangoproject.com/browser/django/trunk/django/core/cache/__init__.py#L77

I have Django project with no CACHES or CACHE_FOO settings in my settings.py. So I'm relying entirely on whatever is in the global_settings.py 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 global_settings.py, 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 by Russell Keith-Magee, 14 years ago

Keywords: blocker added
milestone: 1.3
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 by Adam Vandenberg, 14 years ago

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

comment:3 by Russell Keith-Magee, 14 years ago

@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 by Russell Keith-Magee, 14 years ago

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 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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