﻿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
18127	Make *all* DeprecationWarnings stacklevel=2 or greater	MostAwesomeDude@…	Aymeric Augustin	"This is a testing-the-waters ticket, as I don't want to code this up without some discussion.

DeprecationWarning is very useless without sufficient stack information pointing out who is calling the deprecated callable. Many DeprecationWarnings in Django have the default stacklevel of 1, causing the warning to reference the original file:line where the warning was raised, but it would be much more helpful to raise with a stacklevel of 2, pointing to the *caller* who called the deprecated callable.

Even changing just a few of them, however, has caused a massive propagation of warnings while testing, which tells me that there are many places in Django where deprecated code is being called from obstensibly non-deprecated functions. Is there a reason for not placing DeprecationWarnings at the outer edges of Django's interface?

I searched through the tickets for a bit before deciding that nobody had filed this before."	Cleanup/optimization	closed	Uncategorized	1.4	Normal	fixed		garrison@…	Accepted	1	0	0	0	0	0
