1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings

Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
This commit is contained in:
Claude Paroz
2014-02-26 22:48:20 +01:00
parent 70ec4d776e
commit 210d0489c5
84 changed files with 287 additions and 189 deletions

View File

@@ -17,6 +17,7 @@ import django
from django.core import checks
from django.core.exceptions import ImproperlyConfigured
from django.core.management.color import color_style, no_style
from django.utils.deprecation import RemovedInDjango19Warning
from django.utils.encoding import force_str
@@ -219,7 +220,7 @@ class BaseCommand(object):
warnings.warn(
'"requires_model_validation" is deprecated '
'in favor of "requires_system_checks".',
PendingDeprecationWarning)
RemovedInDjango19Warning)
if has_old_option and has_new_option:
raise ImproperlyConfigured(
'Command %s defines both "requires_model_validation" '
@@ -467,7 +468,7 @@ class AppCommand(BaseCommand):
warnings.warn(
"AppCommand.handle_app() is superseded by "
"AppCommand.handle_app_config().",
PendingDeprecationWarning, stacklevel=2)
RemovedInDjango19Warning, stacklevel=2)
if app_config.models_module is None:
raise CommandError(
"AppCommand cannot handle app '%s' in legacy mode "