[1.8.x] Refs #25846 -- Added stacklevel to SubfieldBase warning.

Backport of 64200c14e0 from stable/1.9.x
This commit is contained in:
Sergey Fedoseev 2015-12-02 23:13:56 +05:00 committed by Tim Graham
parent c3e2e63ec8
commit e73406d165
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class SubfieldBase(type):
"""
def __new__(cls, name, bases, attrs):
warnings.warn("SubfieldBase has been deprecated. Use Field.from_db_value instead.",
RemovedInDjango110Warning)
RemovedInDjango110Warning, stacklevel=2)
new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
new_class.contribute_to_class = make_contrib(