2013-03-06 21:08:21 +04:00
|
|
|
#!/usr/bin/env python
|
2014-11-03 20:20:00 +03:00
|
|
|
|
2013-03-06 21:08:21 +04:00
|
|
|
import os
|
|
|
|
import sys
|
2018-04-11 04:23:34 +03:00
|
|
|
import warnings
|
|
|
|
|
|
|
|
# Display deprecation warnings, which are hidden by default:
|
2019-02-28 23:24:02 +03:00
|
|
|
# https://docs.python.org/3.7/library/warnings.html#default-warning-filters
|
2018-04-11 04:23:34 +03:00
|
|
|
warnings.simplefilter('default', DeprecationWarning)
|
2013-03-06 21:08:21 +04:00
|
|
|
|
2019-02-20 09:45:51 +03:00
|
|
|
# Suppress noisy warnings from dependencies
|
2019-02-28 23:24:02 +03:00
|
|
|
|
2019-02-20 09:45:51 +03:00
|
|
|
# Reported in https://support.newrelic.com/tickets/338064
|
2019-02-28 23:24:02 +03:00
|
|
|
warnings.filterwarnings('ignore', category=DeprecationWarning, module='newrelic')
|
|
|
|
|
2019-02-20 09:45:51 +03:00
|
|
|
# https://github.com/encode/django-rest-framework/issues/6317
|
|
|
|
warnings.filterwarnings('ignore', category=DeprecationWarning, module='markdown.util')
|
|
|
|
|
2019-02-28 23:24:02 +03:00
|
|
|
# "Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working"
|
|
|
|
# corsheaders/checks.py -> https://github.com/ottoyiu/django-cors-headers/issues/374
|
|
|
|
# jinja2/runtime.py -> https://github.com/pallets/jinja/pull/867
|
|
|
|
# orderedmultidict/orderedmultidict.py -> https://github.com/gruns/orderedmultidict/pull/20
|
|
|
|
# promise/promise_list.py -> https://github.com/syrusakbary/promise/pull/67
|
2020-04-21 17:35:59 +03:00
|
|
|
warnings.filterwarnings(
|
|
|
|
'ignore', category=DeprecationWarning, message=r'Using or importing the ABCs .*'
|
|
|
|
)
|
2019-02-28 23:24:02 +03:00
|
|
|
|
|
|
|
# "the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses"
|
|
|
|
warnings.filterwarnings('ignore', category=DeprecationWarning, module='celery.utils.imports')
|
|
|
|
|
2013-03-06 21:08:21 +04:00
|
|
|
if __name__ == "__main__":
|
2015-10-08 17:18:40 +03:00
|
|
|
os.environ["DJANGO_SETTINGS_MODULE"] = "treeherder.config.settings"
|
2013-03-06 21:08:21 +04:00
|
|
|
|
|
|
|
from django.core.management import execute_from_command_line
|
|
|
|
|
|
|
|
execute_from_command_line(sys.argv)
|