Opened 6 years ago
Last modified 4 years ago
#30416 assigned Bug
Runserver's reloading mechanism should restore terminal state completely — at Version 1
Reported by: | Daniel Hahler | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 2.2 |
Severity: | Normal | Keywords: | |
Cc: | Tom Forbes | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | |||
Description (last modified by ) ¶
Currently it only ensures that echo is on, but not that e.g. Ctrl-C works etc.
This can be triggered when using pdb++, which uses pyrepl itself: it puts the terminal into raw state.
If the reloader then kicks in while at the prompt this will not be restored (except for echo).
Related issue, which mentions that a better mechanism would be good: https://code.djangoproject.com/ticket/15880
btw: pyrepl has no chance to restore itself: listening to SIGTERM is not possible in threads apparently, and e.g. atexit
is also not triggered there.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To add tests to the patch, then uncheck the "Needs tests" flag on the ticket.
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.