1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

Renamed RemovedInDjangoXYWarnings for new roadmap.

Forwardport of ae1d663b79
from stable/1.8.x plus more.
This commit is contained in:
Tim Graham
2015-06-22 13:54:35 -04:00
parent e73842a95f
commit aaacaeb096
124 changed files with 455 additions and 448 deletions

View File

@@ -1,7 +1,7 @@
import warnings
from django.forms.widgets import SelectDateWidget
from django.utils.deprecation import RemovedInDjango21Warning
from django.utils.deprecation import RemovedInDjango20Warning
__all__ = ['SelectDateWidget']
@@ -9,4 +9,4 @@ __all__ = ['SelectDateWidget']
warnings.warn(
"django.forms.extras is deprecated. You can find "
"SelectDateWidget in django.forms.widgets instead.",
RemovedInDjango21Warning, stacklevel=2)
RemovedInDjango20Warning, stacklevel=2)

View File

@@ -29,7 +29,7 @@ from django.forms.widgets import (
from django.utils import formats, six
from django.utils.dateparse import parse_duration
from django.utils.deprecation import (
RemovedInDjango20Warning, RenameMethodsBase,
RemovedInDjango110Warning, RenameMethodsBase,
)
from django.utils.duration import duration_string
from django.utils.encoding import force_str, force_text, smart_text
@@ -50,7 +50,7 @@ __all__ = (
class RenameFieldMethods(RenameMethodsBase):
renamed_methods = (
('_has_changed', 'has_changed', RemovedInDjango20Warning),
('_has_changed', 'has_changed', RemovedInDjango110Warning),
)
@@ -544,7 +544,7 @@ class RegexField(CharField):
warnings.warn(
"The 'error_message' argument is deprecated. Use "
"Field.error_messages['invalid'] instead.",
RemovedInDjango20Warning, stacklevel=2
RemovedInDjango110Warning, stacklevel=2
)
error_messages = kwargs.get('error_messages') or {}
error_messages['invalid'] = error_message