#32363: Django shell does not read ~/.python_history
------------------------------------------+------------------------
               Reporter:  Peter Inglesby  |          Owner:  nobody
                   Type:  Uncategorized   |         Status:  new
              Component:  Uncategorized   |        Version:  3.1
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+------------------------
 The Django shell does not read ~/.python_history.

 This is because `sys.__interactivehook__()` is not called in shell.py.

 Adding

 {{{
         try:
             sys.__interactivehook__()
         except Exception:
             print("Failed calling sys.__interactivehook__")
             traceback.print_exc()
 }}}

 just before the call to `code.interpret()` in shell.py fixes this, and
 makes the Django shell nearly match the behaviour of the Python shell.

 I'll create a PR.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32363>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.bddeb13bc4e72952d8e53e161167a356%40djangoproject.com.

Reply via email to