Opened 5 months ago
Last modified 6 weeks ago
#36434 closed Bug
manage.py runserver only respects python -u flag if --noreload is present (-u flag forces streams to be unbuffered) — at Version 1
| Reported by: | Ivan | Owned by: | |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | dev |
| Severity: | Normal | Keywords: | runserver, -u, PYTHONUNBUFFERED |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
From python help:
-u : force the stdout and stderr streams to be unbuffered;
this option has no effect on stdin; also PYTHONUNBUFFERED=x
Running manage.py runserver only respects python -u flag if --noreload is present, meanwhile setting the environment variable PYTHONUNBUFFERED=1 works fine.
The solution is likely to make sure subprocesses are called with the very same flag.
Note:
See TracTickets
for help on using tickets.