1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Advanced pending deprecation warnings.

Also added stacklevel argument, fixed #18127.
This commit is contained in:
Aymeric Augustin
2012-12-25 21:07:27 +01:00
parent 130829334c
commit ef017a5f00
12 changed files with 24 additions and 23 deletions

View File

@@ -36,7 +36,7 @@ class StrAndUnicode(object):
def __init__(self, *args, **kwargs):
warnings.warn("StrAndUnicode is deprecated. Define a __str__ method "
"and apply the @python_2_unicode_compatible decorator "
"instead.", PendingDeprecationWarning, stacklevel=2)
"instead.", DeprecationWarning, stacklevel=2)
super(StrAndUnicode, self).__init__(*args, **kwargs)
if six.PY3: