Opened 3 months ago

Last modified 3 days ago

#36434 assigned Bug

manage.py runserver only respects python -u flag if --noreload is present (-u flag forces streams to be unbuffered)

Reported by: Ivan Owned by: JaeHyuckSa
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 (7)

comment:1 by Ivan, 3 months ago

Description: modified (diff)

comment:2 by Ivan, 3 months ago

Component: UncategorizedCore (Management commands)

comment:3 by Sarah Boyce, 3 months ago

Triage Stage: UnreviewedAccepted
Version: 5.1dev

Thank you, replicated

comment:4 by myoungjinGo, 3 months ago

Owner: set to myoungjinGo
Status: newassigned

comment:5 by myoungjinGo, 3 days ago

Owner: myoungjinGo removed
Status: assignednew

comment:6 by JaeHyuckSa, 3 days ago

Owner: set to JaeHyuckSa
Status: newassigned

comment:7 by JaeHyuckSa, 3 days ago

Has patch: set
Note: See TracTickets for help on using tickets.
Back to Top