#30588 closed Bug (fixed)
ipdb breaks the autoreloader.
| Reported by: | Tom Forbes | Owned by: | Tom Forbes |
|---|---|---|---|
| Component: | Utilities | Version: | 2.2 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Using ipdb within Django causes an error:
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
Change History (5)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
| Has patch: | set |
|---|
comment:3 by , 6 years ago
| Component: | Uncategorized → Utilities |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Summary: | ipdb breaks the autoreloader → ipdb breaks the autoreloader. |
| Triage Stage: | Unreviewed → Accepted |
Thanks for the report.
Regression in b2790f74d4f38c8b297b7c1cef6875d2378f6fa6.
Note:
See TracTickets
for help on using tickets.
PR: https://github.com/django/django/pull/11507