diff --git a/django/db/models/base.py b/django/db/models/base.py index 945cd0154b..f3f786f916 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -25,7 +25,6 @@ from django.db.models.options import Options from django.db.models.query import Q from django.db.models.query_utils import DeferredAttribute, deferred_class_factory from django.utils import six -from django.utils.deprecation import RemovedInDjango19Warning from django.utils.encoding import force_str, force_text from django.utils.functional import curry from django.utils.six.moves import zip @@ -106,7 +105,7 @@ class ModelBase(type): "This will no longer be supported in Django 1.9." % (module, name)) if not abstract: - warnings.warn(msg, RemovedInDjango19Warning, stacklevel=2) + warnings.warn(msg, DeprecationWarning, stacklevel=2) model_module = sys.modules[new_class.__module__] package_components = model_module.__name__.split('.') diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index e6a818c9c4..a31392abd1 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -2,15 +2,15 @@ import inspect import warnings -class RemovedInDjango20Warning(PendingDeprecationWarning): +class RemovedInDjango21Warning(PendingDeprecationWarning): pass -class RemovedInDjango19Warning(DeprecationWarning): +class RemovedInDjango20Warning(DeprecationWarning): pass -RemovedInNextVersionWarning = RemovedInDjango19Warning +RemovedInNextVersionWarning = RemovedInDjango20Warning class warn_about_renamed_method(object): diff --git a/tests/runtests.py b/tests/runtests.py index 1ae981e905..6cb589b935 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -15,13 +15,13 @@ from django.conf import settings from django.db import connection from django.test import TransactionTestCase, TestCase from django.test.utils import get_runner -from django.utils.deprecation import RemovedInDjango19Warning, RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango21Warning from django.utils._os import upath from django.utils import six -warnings.simplefilter("error", RemovedInDjango19Warning) warnings.simplefilter("error", RemovedInDjango20Warning) +warnings.simplefilter("error", RemovedInDjango21Warning) CONTRIB_MODULE_PATH = 'django.contrib'