1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Advanced deprecation warnings for Django 4.2.

This commit is contained in:
Carlton Gibson
2022-05-10 15:17:59 +02:00
committed by Carlton Gibson
parent ca1c3151c3
commit cdb2f7f36c
3 changed files with 17 additions and 4 deletions

View File

@@ -29,7 +29,10 @@ else:
from django.test.runner import _init_worker, get_max_test_processes, parallel_type
from django.test.selenium import SeleniumTestCaseBase
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
from django.utils.deprecation import RemovedInDjango50Warning
from django.utils.deprecation import (
RemovedInDjango50Warning,
RemovedInDjango51Warning,
)
from django.utils.log import DEFAULT_LOGGING
try:
@@ -42,6 +45,7 @@ else:
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings.simplefilter("error", RemovedInDjango50Warning)
warnings.simplefilter("error", RemovedInDjango51Warning)
# Make resource and runtime warning errors to ensure no usage of error prone
# patterns.
warnings.simplefilter("error", ResourceWarning)