mirror of
https://github.com/django/django.git
synced 2025-09-25 07:59:11 +00:00
Advanced deprecation warnings for Django 6.1.
This commit is contained in:
parent
b83204a06e
commit
cebbd5a6ad
@ -18,7 +18,7 @@ def django_file_prefixes():
|
|||||||
return (os.path.dirname(file),)
|
return (os.path.dirname(file),)
|
||||||
|
|
||||||
|
|
||||||
class RemovedInDjango61Warning(DeprecationWarning):
|
class RemovedInNextVersionWarning(DeprecationWarning):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -26,7 +26,6 @@ class RemovedInDjango70Warning(PendingDeprecationWarning):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
RemovedInNextVersionWarning = RemovedInDjango61Warning
|
|
||||||
RemovedAfterNextVersionWarning = RemovedInDjango70Warning
|
RemovedAfterNextVersionWarning = RemovedInDjango70Warning
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,6 +53,11 @@ details on these changes.
|
|||||||
* The ``django.core.mail.forbid_multi_line_headers()`` and
|
* The ``django.core.mail.forbid_multi_line_headers()`` and
|
||||||
``django.core.mail.message.sanitize_address()`` functions will be removed.
|
``django.core.mail.message.sanitize_address()`` functions will be removed.
|
||||||
|
|
||||||
|
See the :ref:`Django 6.1 release notes <deprecated-features-6.1>` for more
|
||||||
|
details on these changes.
|
||||||
|
|
||||||
|
* ...
|
||||||
|
|
||||||
.. _deprecation-removed-in-6.1:
|
.. _deprecation-removed-in-6.1:
|
||||||
|
|
||||||
6.1
|
6.1
|
||||||
|
@ -28,10 +28,7 @@ else:
|
|||||||
from django.test.runner import get_max_test_processes, parallel_type
|
from django.test.runner import get_max_test_processes, parallel_type
|
||||||
from django.test.selenium import SeleniumTestCase, SeleniumTestCaseBase
|
from django.test.selenium import SeleniumTestCase, SeleniumTestCaseBase
|
||||||
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
|
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
|
||||||
from django.utils.deprecation import (
|
from django.utils.deprecation import RemovedInDjango70Warning
|
||||||
RemovedInDjango61Warning,
|
|
||||||
RemovedInDjango70Warning,
|
|
||||||
)
|
|
||||||
from django.utils.functional import classproperty
|
from django.utils.functional import classproperty
|
||||||
from django.utils.log import DEFAULT_LOGGING
|
from django.utils.log import DEFAULT_LOGGING
|
||||||
from django.utils.version import PYPY
|
from django.utils.version import PYPY
|
||||||
@ -47,7 +44,6 @@ else:
|
|||||||
|
|
||||||
# Make deprecation warnings errors to ensure no usage of deprecated features.
|
# Make deprecation warnings errors to ensure no usage of deprecated features.
|
||||||
warnings.simplefilter("error", RemovedInDjango70Warning)
|
warnings.simplefilter("error", RemovedInDjango70Warning)
|
||||||
warnings.simplefilter("error", RemovedInDjango61Warning)
|
|
||||||
# Make resource and runtime warning errors to ensure no usage of error prone
|
# Make resource and runtime warning errors to ensure no usage of error prone
|
||||||
# patterns.
|
# patterns.
|
||||||
warnings.simplefilter("error", ResourceWarning)
|
warnings.simplefilter("error", ResourceWarning)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user