On Wed, Jan 29, 2014 at 6:01 AM, Andrew Svetlov <[email protected]>wrote:
> On Wed, Jan 29, 2014 at 3:39 PM, Victor Stinner > <[email protected]> wrote: > > 2014-01-29 Andrew Svetlov <[email protected]>: > >> And using stdin=None doesn't make sense at all: if program requires some > >> user input it unlikely should hang on blocking call waiting of some > typing > >> on keyboard. > > > > It makes sense, stdin is shared with python, it's usually a TTY. For > > example, you can be asked for a password. It's the same when you run > > sudo in a shell script. > > > > stdin=None is the default in Python and I cannot remember someone > > complaining about that. > > Ok, I agree. > The main reason for me is: don't change subprocess default and don't > confuse users, defaults are good enough and safe. > > So I'm +1 for changing defaults in AbstractEventLoop also if now is > not too late. > I think it is fine to have the defaults differ in this case. When writing your own protocol class, the normal case is to have all pipes hooked up. But when using the convenience API you should explicitly specify which pipes to hook up. Note that the convenience API is closer to the regular subprocess module. (I also think it's too late to change, but I honestly think this is how it should be even if we could change it.) -- --Guido van Rossum (python.org/~guido)
