#30588: ipdb breaks the autoreloader
-------------------------------------------+------------------------
               Reporter:  Tom Forbes       |          Owner:  nobody
                   Type:  Bug              |         Status:  new
              Component:  Uncategorized    |        Version:  2.2
               Severity:  Release blocker  |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 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

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30588>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/046.560f1f1091acf73123eb1d1e4a201783%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to