Add a useful stacklevel to some RemovedInDjango19Warnings
This commit is contained in:
parent
bf2b0affe4
commit
b077ba7ac1
|
@ -4,6 +4,7 @@ from django.utils.deprecation import RemovedInDjango19Warning
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The django.contrib.gis.db.backends.util module has been renamed. "
|
"The django.contrib.gis.db.backends.util module has been renamed. "
|
||||||
"Use django.contrib.gis.db.backends.utils instead.", RemovedInDjango19Warning)
|
"Use django.contrib.gis.db.backends.utils instead.",
|
||||||
|
RemovedInDjango19Warning, stacklevel=2)
|
||||||
|
|
||||||
from django.contrib.gis.db.backends.utils import * # NOQA
|
from django.contrib.gis.db.backends.utils import * # NOQA
|
||||||
|
|
|
@ -4,6 +4,7 @@ from django.utils.deprecation import RemovedInDjango19Warning
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The django.db.backends.util module has been renamed. "
|
"The django.db.backends.util module has been renamed. "
|
||||||
"Use django.db.backends.utils instead.", RemovedInDjango19Warning)
|
"Use django.db.backends.utils instead.", RemovedInDjango19Warning,
|
||||||
|
stacklevel=2)
|
||||||
|
|
||||||
from django.db.backends.utils import * # NOQA
|
from django.db.backends.utils import * # NOQA
|
||||||
|
|
|
@ -4,6 +4,6 @@ from django.utils.deprecation import RemovedInDjango19Warning
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The django.forms.util module has been renamed. "
|
"The django.forms.util module has been renamed. "
|
||||||
"Use django.forms.utils instead.", RemovedInDjango19Warning)
|
"Use django.forms.utils instead.", RemovedInDjango19Warning, stacklevel=2)
|
||||||
|
|
||||||
from django.forms.utils import * # NOQA
|
from django.forms.utils import * # NOQA
|
||||||
|
|
|
@ -12,7 +12,7 @@ from django.utils.encoding import force_str, force_text, DEFAULT_LOCALE_ENCODING
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"django.utils.tzinfo will be removed in Django 1.9. "
|
"django.utils.tzinfo will be removed in Django 1.9. "
|
||||||
"Use django.utils.timezone instead.",
|
"Use django.utils.timezone instead.",
|
||||||
RemovedInDjango19Warning)
|
RemovedInDjango19Warning, stacklevel=2)
|
||||||
|
|
||||||
|
|
||||||
# Python's doc say: "A tzinfo subclass must have an __init__() method that can
|
# Python's doc say: "A tzinfo subclass must have an __init__() method that can
|
||||||
|
|
Loading…
Reference in New Issue