diff options
| author | David Smith <smithdc@gmail.com> | 2022-02-12 20:40:12 +0000 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2022-03-15 16:23:55 +0100 |
| commit | 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc (patch) | |
| tree | 8ab2c436451318223606470fcdc23b6dc690da20 /django/utils/autoreload.py | |
| parent | 3eaba13a476c14b75429ba34180184b81997b33a (diff) | |
Fixed #31169 -- Adapted the parallel test runner to use spawn.
Co-authored-by: Valz <ahmadahussein0@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
Diffstat (limited to 'django/utils/autoreload.py')
| -rw-r--r-- | django/utils/autoreload.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 7b9219f4c1..1b3652b41d 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -130,7 +130,7 @@ def iter_modules_and_files(modules, extra_files): # cause issues here. if not isinstance(module, ModuleType): continue - if module.__name__ == "__main__": + if module.__name__ in ("__main__", "__mp_main__"): # __main__ (usually manage.py) doesn't always have a __spec__ set. # Handle this by falling back to using __file__, resolved below. # See https://docs.python.org/reference/import.html#main-spec |
