mirror of
https://github.com/django/django.git
synced 2025-09-23 02:33:31 +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:
parent
70ec4d776e
commit
210d0489c5
84 changed files with 287 additions and 189 deletions
|
@ -6,6 +6,7 @@ from gzip import GzipFile
|
|||
from io import BytesIO
|
||||
import warnings
|
||||
|
||||
from django.utils.deprecation import RemovedInDjango19Warning
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import allow_lazy, SimpleLazyObject
|
||||
from django.utils import six
|
||||
|
@ -332,7 +333,7 @@ def javascript_quote(s, quote_double_quotes=False):
|
|||
"django.utils.text.javascript_quote() is deprecated. "
|
||||
"Use django.utils.html.escapejs() instead."
|
||||
)
|
||||
warnings.warn(msg, PendingDeprecationWarning, stacklevel=2)
|
||||
warnings.warn(msg, RemovedInDjango19Warning, stacklevel=2)
|
||||
|
||||
def fix(match):
|
||||
return "\\u%04x" % ord(match.group(1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue