summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_module/__main__.py
diff options
context:
space:
mode:
authorWilliam Schwartz <wkschwartz@gmail.com>2021-01-04 08:50:49 -0600
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-05 21:03:29 +0100
commitec6d2531c59466924b645f314ac33f54470d7ac3 (patch)
tree5da987d1502badb8e50650315ab7f0cff58a5281 /tests/utils_tests/test_module/__main__.py
parent415f50298f97fb17f841a9df38d995ccf347dfcc (diff)
Fixed #32314 -- Fixed detection when started non-django modules with "python -m" in autoreloader.
django.utils.autoreload.get_child_arguments() detected when Python was started with the `-m` option only for `django` module. This commit changes the logic to check __spec__, see https://docs.python.org/3/reference/import.html#main-spec Now packages can implement their own __main__ with the runserver command.
Diffstat (limited to 'tests/utils_tests/test_module/__main__.py')
-rw-r--r--tests/utils_tests/test_module/__main__.py0
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/utils_tests/test_module/__main__.py b/tests/utils_tests/test_module/__main__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/utils_tests/test_module/__main__.py