{{{
File "/usr/local/lib/python3.7/site-
packages/django/utils/autoreload.py", line 249, in watched_files
yield from iter_all_python_module_files()
File "/usr/local/lib/python3.7/site-
packages/django/utils/autoreload.py", line 103, in
iter_all_python_module_files
return iter_modules_and_files(modules, frozenset(_error_files))
File "/usr/local/lib/python3.7/site-
packages/django/utils/autoreload.py", line 120, in iter_modules_and_files
sys_file_paths.append(module.__file__)
AttributeError: module '__main__' has no attribute '__file__'
}}}
ipython seems to patch __main__:
https://github.com/ipython/ipython/blob/7b42de99c651de35f487adea3f57824ad97bcd74/IPython/testing/globalipapp.py#L115
--
Ticket URL: <https://code.djangoproject.com/ticket/30588>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tom Forbes):
PR: https://github.com/django/django/pull/11507
--
Ticket URL: <https://code.djangoproject.com/ticket/30588#comment:1>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30588#comment:2>
* owner: nobody => Tom Forbes
* status: new => assigned
* component: Uncategorized => Utilities
* stage: Unreviewed => Accepted
Comment:
Thanks for the report.
Regression in b2790f74d4f38c8b297b7c1cef6875d2378f6fa6.
--
Ticket URL: <https://code.djangoproject.com/ticket/30588#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"8454f6dea49dddb821bfcb7569ea222bb487dfd1" 8454f6de]:
{{{
#!CommitTicketReference repository=""
revision="8454f6dea49dddb821bfcb7569ea222bb487dfd1"
Fixed #30588 -- Fixed crash of autoreloader when __main__ module doesn't
have __file__ attribute.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30588#comment:4>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"bdc1de21992bfbc58e719442d3fb990894b6b713" bdc1de2]:
{{{
#!CommitTicketReference repository=""
revision="bdc1de21992bfbc58e719442d3fb990894b6b713"
[2.2.x] Fixed #30588 -- Fixed crash of autoreloader when __main__ module
doesn't have __file__ attribute.
Backport of 8454f6dea49dddb821bfcb7569ea222bb487dfd1 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30588#comment:5>