Opened 3 months ago

Last modified 7 days ago

#36434 assigned 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: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ivan)

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.

Change History (1)

comment:1 by Ivan, 3 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top