Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.7.x] Add a useful stacklevel to some RemovedInDjango19Warnings

Backport of b077ba7 from master
  • Loading branch information...
commit fe61ba91c723b77173fc3221dbd92ad267cbd3a9 1 parent 4678efd
Chris Beaven SmileyChris authored timgraham committed
3  django/contrib/gis/db/backends/util.py
View
@@ -4,6 +4,7 @@
warnings.warn(
"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
3  django/db/backends/util.py
View
@@ -4,6 +4,7 @@
warnings.warn(
"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
2  django/forms/util.py
View
@@ -4,6 +4,6 @@
warnings.warn(
"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
2  django/utils/tzinfo.py
View
@@ -12,7 +12,7 @@
warnings.warn(
"django.utils.tzinfo will be removed in Django 1.9. "
"Use django.utils.timezone instead.",
- RemovedInDjango19Warning)
+ RemovedInDjango19Warning, stacklevel=2)
# Python's doc say: "A tzinfo subclass must have an __init__() method that can
Please sign in to comment.
Something went wrong with that request. Please try again.