summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-06-22 13:54:35 -0400
committerTim Graham <timograham@gmail.com>2015-06-23 07:22:16 -0400
commitae1d663b7913f6da233c55409c4973248372d302 (patch)
tree1ac06b1eccd77be127ae8d046e9ade878623c176 /django/utils
parent7439039806038ce35d3a91f430037c667dcab051 (diff)
[1.8.x] Renamed RemovedInDjango20Warning to RemovedInDjango110Warning.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/checksums.py6
-rw-r--r--django/utils/deprecation.py5
-rw-r--r--django/utils/html.py6
3 files changed, 10 insertions, 7 deletions
diff --git a/django/utils/checksums.py b/django/utils/checksums.py
index 40d6814d52..c74631acb2 100644
--- a/django/utils/checksums.py
+++ b/django/utils/checksums.py
@@ -7,12 +7,12 @@ __all__ = ['luhn']
import warnings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
warnings.warn(
- "django.utils.checksums will be removed in Django 2.0. The "
+ "django.utils.checksums will be removed in Django 1.10. The "
"luhn() function is now included in django-localflavor 1.1+.",
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) # sum_of_digits(index * 2)
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py
index e6a818c9c4..6a0c91daa0 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -2,9 +2,12 @@ import inspect
import warnings
-class RemovedInDjango20Warning(PendingDeprecationWarning):
+class RemovedInDjango110Warning(PendingDeprecationWarning):
pass
+# for backwards compatibility in Django 1.8.3
+RemovedInDjango20Warning = PendingDeprecationWarning
+
class RemovedInDjango19Warning(DeprecationWarning):
pass
diff --git a/django/utils/html.py b/django/utils/html.py
index 837a17f171..a2672d432c 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -7,7 +7,7 @@ import sys
import warnings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_str, force_text
from django.utils.functional import allow_lazy
from django.utils.http import RFC3986_GENDELIMS, RFC3986_SUBDELIMS
@@ -198,7 +198,7 @@ def remove_tags(html, tags):
warnings.warn(
"django.utils.html.remove_tags() and the removetags template filter "
"are deprecated. Consider using the bleach library instead.",
- RemovedInDjango20Warning, stacklevel=3
+ RemovedInDjango110Warning, stacklevel=3
)
tags = [re.escape(tag) for tag in tags.split()]
tags_re = '(%s)' % '|'.join(tags)
@@ -220,7 +220,7 @@ def strip_entities(value):
"""Returns the given HTML with all entities (&something;) stripped."""
warnings.warn(
"django.utils.html.strip_entities() is deprecated.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return re.sub(r'&(?:\w+|#\d+);', '', force_text(value))
strip_entities = allow_lazy(strip_entities, six.text_type)