Kaydet (Commit) 4a461d49 authored tarafından Tim Graham's avatar Tim Graham

Advanced deprecation warnings for Django 2.1.

üst 5446b720
......@@ -6,13 +6,10 @@ class RemovedInDjango30Warning(PendingDeprecationWarning):
pass
class RemovedInDjango21Warning(DeprecationWarning):
class RemovedInNextVersionWarning(DeprecationWarning):
pass
RemovedInNextVersionWarning = RemovedInDjango21Warning
class warn_about_renamed_method:
def __init__(self, class_name, old_method_name, new_method_name, deprecation_warning):
self.class_name = class_name
......
......@@ -29,6 +29,9 @@ details on these changes.
* The ``field_name`` keyword argument of ``QuerySet.earliest()`` and
``latest()`` will be removed.
See the :ref:`Django 2.1 release notes <deprecated-features-2.1>` for more
details on these changes.
.. _deprecation-removed-in-2.1:
2.1
......
......@@ -17,14 +17,11 @@ from django.test import TestCase, TransactionTestCase
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 (
RemovedInDjango21Warning, RemovedInDjango30Warning,
)
from django.utils.deprecation import RemovedInDjango30Warning
from django.utils.log import DEFAULT_LOGGING
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings.simplefilter("error", RemovedInDjango30Warning)
warnings.simplefilter("error", RemovedInDjango21Warning)
# Make runtime warning errors to ensure no usage of error prone patterns.
warnings.simplefilter("error", RuntimeWarning)
# Ignore known warnings in test dependencies.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment