diff options
| author | Tim Graham <timograham@gmail.com> | 2018-12-27 21:00:33 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-17 11:15:27 -0500 |
| commit | f5060a138583c46e14231b7ca1d256dc1e42f9f9 (patch) | |
| tree | 085be9ec3bde6f1ef1881b3ec515d6c28ba30d7c | |
| parent | da1de1615c4d498d7de015dc0028ad4be220df15 (diff) | |
Advanced deprecation warnings for Django 3.0.
| -rw-r--r-- | django/utils/deprecation.py | 6 | ||||
| -rw-r--r-- | docs/internals/deprecation.txt | 8 | ||||
| -rwxr-xr-x | tests/runtests.py | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index 8c7dd050fb..19d8a9bd3a 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -2,15 +2,15 @@ import inspect import warnings -class RemovedInDjango30Warning(DeprecationWarning): +class RemovedInDjango31Warning(DeprecationWarning): pass -class RemovedInDjango31Warning(PendingDeprecationWarning): +class RemovedInDjango40Warning(PendingDeprecationWarning): pass -RemovedInNextVersionWarning = RemovedInDjango30Warning +RemovedInNextVersionWarning = RemovedInDjango31Warning class warn_about_renamed_method: diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 087458fa5e..1a5b98df33 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -7,6 +7,14 @@ in a backward incompatible way, following their deprecation, as per the :ref:`deprecation policy <internal-release-deprecation-policy>`. More details about each item can often be found in the release notes of two versions prior. +.. _deprecation-removed-in-4.0: + +4.0 +--- + +See the :ref:`Django 3.0 release notes <deprecated-features-3.0>` for more +details on these changes. + .. _deprecation-removed-in-3.1: 3.1 diff --git a/tests/runtests.py b/tests/runtests.py index 8c30b9d802..871b6c202d 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -19,7 +19,7 @@ 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 ( - RemovedInDjango30Warning, RemovedInDjango31Warning, + RemovedInDjango31Warning, RemovedInDjango40Warning, ) from django.utils.log import DEFAULT_LOGGING @@ -32,7 +32,7 @@ else: warnings.filterwarnings('ignore', r'\(1003, *', category=MySQLdb.Warning) # Make deprecation warnings errors to ensure no usage of deprecated features. -warnings.simplefilter("error", RemovedInDjango30Warning) +warnings.simplefilter("error", RemovedInDjango40Warning) warnings.simplefilter('error', RemovedInDjango31Warning) # Make runtime warning errors to ensure no usage of error prone patterns. warnings.simplefilter("error", RuntimeWarning) |
