mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #18985 -- ensure module level deprecations are displayed
Also don't compete with -W CLI option. Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
This commit is contained in:
parent
9c4882b391
commit
e79b857a07
6 changed files with 40 additions and 22 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
|
@ -82,6 +83,14 @@ def setup(verbosity, test_labels):
|
|||
settings.LANGUAGE_CODE = 'en'
|
||||
settings.SITE_ID = 1
|
||||
|
||||
if verbosity > 0:
|
||||
# Ensure any warnings captured to logging are piped through a verbose
|
||||
# logging handler. If any -W options were passed explicitly on command
|
||||
# line, warnings are not captured, and this has no effect.
|
||||
logger = logging.getLogger('py.warnings')
|
||||
handler = logging.StreamHandler()
|
||||
logger.addHandler(handler)
|
||||
|
||||
# Load all the ALWAYS_INSTALLED_APPS.
|
||||
get_apps()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue