From 4e78e389b16fbceb23d5236ee1650b213e71c968 Mon Sep 17 00:00:00 2001 From: Adam Allred Date: Wed, 17 Oct 2018 19:47:20 -0400 Subject: Fixed #29774 -- Fixed django-admin shell hang on startup. sys.stdin.read() blocks waiting for EOF in shell.py which will likely never come if the user provides input on stdin via the keyboard before the shell starts. Added check for a tty to skip reading stdin if it's not present. This still allows piping of code into the shell (which should have no TTY and should have an EOF) but also doesn't cause it to hang if multi-line input is provided. --- docs/releases/2.1.3.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/releases/2.1.3.txt b/docs/releases/2.1.3.txt index 15e53db65b..7e0446219e 100644 --- a/docs/releases/2.1.3.txt +++ b/docs/releases/2.1.3.txt @@ -11,3 +11,6 @@ Bugfixes * Fixed a regression in Django 2.0 where combining ``Q`` objects with ``__in`` lookups and lists crashed (:ticket:`29838`). + +* Fixed a regression in Django 1.11 where ``django-admin shell`` may hang + on startup (:ticket:`29774`). -- cgit v1.3