﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17643	Misleading deprecation warnings raised by the cache_page decorator	Zbigniew Siciarz	Zbigniew Siciarz	"The ``cache_page`` decorator should be called in The One True Way, which is:

{{{
@cache_page(120)
def my_view(request):
    # ...
}}}

Any old-style calls raise now a ``PendingDeprecationWarning``. However, the warning that is printed to the stdout is misleading with regard to line numbers. All the warnings point to the ``warnings.warn`` call. It would be more useful to point to the actual ``@cache_page`` calls.

For the record, this is the current behaviour:


{{{
C:\Users\USER\v\django14\django\django\views\decorators\cache.py:47: PendingDeprecationWarning: The cache_page decorator must be called like: cache_page(timeout, [cache=cache name], [key_prefix=key prefix]). All other ways are deprecated.
  PendingDeprecationWarning)
C:\Users\USER\v\django14\django\django\views\decorators\cache.py:47: PendingDeprecationWarning: The cache_page decorator must be called like: cache_page(timeout, [cache=cache name], [key_prefix=key prefix]). All other ways are deprecated.
  PendingDeprecationWarning)
C:\Users\USER\v\django14\django\django\views\decorators\cache.py:47: PendingDeprecationWarning: The cache_page decorator must be called like: cache_page(timeout, [cache=cache name], [key_prefix=key prefix]). All other ways are deprecated.
  PendingDeprecationWarning)
C:\Users\USER\v\django14\django\django\views\decorators\cache.py:47: PendingDeprecationWarning: The cache_page decorator must be called like: cache_page(timeout, [cache=cache name], [key_prefix=key prefix]). All other ways are deprecated.
  PendingDeprecationWarning)
}}}



"	Cleanup/optimization	closed	Core (Other)	1.4-alpha-1	Normal	fixed	deprecation		Ready for checkin	1	0	0	0	1	0
