summaryrefslogtreecommitdiff
path: root/django/utils/log.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-03-08 11:13:45 +0100
committerClaude Paroz <claude@2xlibre.net>2014-03-08 11:13:48 +0100
commit0c6a3399523d850cfbd20de54cd089419a47383d (patch)
tree78839b6f7be84b69a12577ae4d95d452a267a016 /django/utils/log.py
parent210d0489c5daad56b806f8165f9fe09fb3c2a019 (diff)
Avoided changing raw DeprecationWarning filter behavior
Refs #21188. Now pure Python DeprecationWarning visibility should be back to Python defaults.
Diffstat (limited to 'django/utils/log.py')
-rw-r--r--django/utils/log.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/utils/log.py b/django/utils/log.py
index f319704116..83ba15f52a 100644
--- a/django/utils/log.py
+++ b/django/utils/log.py
@@ -5,6 +5,7 @@ import warnings
from django.conf import settings
from django.core import mail
from django.core.mail import get_connection
+from django.utils.deprecation import RemovedInNextVersionWarning
from django.utils.module_loading import import_string
from django.views.debug import ExceptionReporter, get_exception_reporter_filter
@@ -68,8 +69,9 @@ def configure_logging(logging_config, logging_settings):
if not sys.warnoptions:
# Route warnings through python logging
logging.captureWarnings(True)
- # Allow DeprecationWarnings through the warnings filters
- warnings.simplefilter("default", DeprecationWarning)
+ # RemovedInNextVersionWarning is a subclass of DeprecationWarning which
+ # is hidden by default, hence we force the "default" behavior
+ warnings.simplefilter("default", RemovedInNextVersionWarning)
if logging_config:
# First find the logging configuration function ...