diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-07 19:44:23 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-09-10 12:01:00 +0200 |
| commit | 9a2a12d415e6d224797b0779c5af03deb8c45b0a (patch) | |
| tree | be3812c55c02ccce8a257e2c53d09a6534cd6a9f | |
| parent | 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6 (diff) | |
Advanced deprecation warnings for Django 3.1.
| -rw-r--r-- | django/utils/deprecation.py | 5 | ||||
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rwxr-xr-x | tests/runtests.py | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index 19d8a9bd3a..6599cd2e83 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -2,7 +2,7 @@ import inspect import warnings -class RemovedInDjango31Warning(DeprecationWarning): +class RemovedInNextVersionWarning(DeprecationWarning): pass @@ -10,9 +10,6 @@ class RemovedInDjango40Warning(PendingDeprecationWarning): pass -RemovedInNextVersionWarning = RemovedInDjango31Warning - - class warn_about_renamed_method: def __init__(self, class_name, old_method_name, new_method_name, deprecation_warning): self.class_name = class_name diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index f29b6b2fac..03e9fa93ce 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -34,6 +34,9 @@ details on these changes. * ``django.utils.http.is_safe_url()`` will be removed. +See the :ref:`Django 3.1 release notes <deprecated-features-3.1>` for more +details on these changes. + .. _deprecation-removed-in-3.1: 3.1 diff --git a/tests/runtests.py b/tests/runtests.py index be1760e693..293396f96c 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -24,9 +24,7 @@ else: from django.test.runner import default_test_processes from django.test.selenium import SeleniumTestCaseBase from django.test.utils import get_runner - from django.utils.deprecation import ( - RemovedInDjango31Warning, RemovedInDjango40Warning, - ) + from django.utils.deprecation import RemovedInDjango40Warning from django.utils.log import DEFAULT_LOGGING from django.utils.version import PY37 @@ -40,7 +38,6 @@ else: # Make deprecation warnings errors to ensure no usage of deprecated features. warnings.simplefilter("error", RemovedInDjango40Warning) -warnings.simplefilter('error', RemovedInDjango31Warning) # Make runtime warning errors to ensure no usage of error prone patterns. warnings.simplefilter("error", RuntimeWarning) # Ignore known warnings in test dependencies. |
