forked from mozilla/treeherder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manage.py
executable file
·36 lines (26 loc) · 1.52 KB
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
import os
import sys
import warnings
# Display deprecation warnings, which are hidden by default:
# https://docs.python.org/3.7/library/warnings.html#default-warning-filters
warnings.simplefilter('default', DeprecationWarning)
# Suppress noisy warnings from dependencies
# Reported in https://support.newrelic.com/tickets/338064
warnings.filterwarnings('ignore', category=DeprecationWarning, module='newrelic')
# https://github.com/encode/django-rest-framework/issues/6317
warnings.filterwarnings('ignore', category=DeprecationWarning, module='markdown.util')
# "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
warnings.filterwarnings(
'ignore', category=DeprecationWarning, message=r'Using or importing the ABCs .*'
)
# "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')
if __name__ == "__main__":
os.environ["DJANGO_SETTINGS_MODULE"] = "treeherder.config.settings"
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)