mirror of
https://github.com/django/django.git
synced 2025-09-18 00:10:22 +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
|
@ -5,6 +5,7 @@ import sys
|
|||
import warnings
|
||||
|
||||
from django.utils import six
|
||||
from django.utils.deprecation import RemovedInDjango19Warning
|
||||
from django.utils.six.moves import copyreg
|
||||
|
||||
|
||||
|
@ -27,7 +28,7 @@ def memoize(func, cache, num_args):
|
|||
"""
|
||||
warnings.warn("memoize wrapper is deprecated and will be removed in "
|
||||
"Django 1.9. Use django.utils.lru_cache instead.",
|
||||
PendingDeprecationWarning, stacklevel=2)
|
||||
RemovedInDjango19Warning, stacklevel=2)
|
||||
|
||||
@wraps(func)
|
||||
def wrapper(*args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue