Advanced deprecation warnings for Django 4.0.

This commit is contained in:
Mariusz Felisiak 2021-01-14 10:40:19 +01:00
parent 0aa6a602b2
commit b4c5f878bd
3 changed files with 13 additions and 5 deletions

View file

@ -25,7 +25,7 @@ else:
from django.test.selenium import SeleniumTestCaseBase
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
from django.utils.deprecation import (
RemovedInDjango40Warning, RemovedInDjango41Warning,
RemovedInDjango41Warning, RemovedInDjango50Warning,
)
from django.utils.log import DEFAULT_LOGGING
from django.utils.version import PY37
@ -39,7 +39,7 @@ else:
warnings.filterwarnings('ignore', r'\(1003, *', category=MySQLdb.Warning)
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings.simplefilter("error", RemovedInDjango40Warning)
warnings.simplefilter('error', RemovedInDjango50Warning)
warnings.simplefilter('error', RemovedInDjango41Warning)
# Make resource and runtime warning errors to ensure no usage of error prone
# patterns.