Author rosslagerwall
Recipients amicitas, giampaolo.rodola, neologix, rosslagerwall
Date 2011-03-15.15:02:56
SpamBayes Score 1.27738e-08
Marked as misclassified No
Message-id <1300201377.47.0.174787830391.issue11459@psf.upfronthosting.co.za>
In-reply-to
Content
The Charles' patch fixes the problem but breaks [test_os test_poll test_popen test_select test_uuid] when running make test.

Those two lines were introduced by Guido in [1f7891d84d93] but that was back in 2007 when subprocess used os.fdopen and the new IO hadn't been invented (I think). They should probably be removed now.

I think it breaks those tests because despite the fact that the docs claim subprocess defaults to unbuffered, it has been set at bufsize=1 which actually causes line buffering mode. os.popen wraps the returned stream with a TextIOWrapper which doesn't work with an unbuffered stream.

The attached patch causes os.popen (and platform.popen) to default to line buffered mode and to throw an error if buffering=0 is passed (unbuffered).

I don't think this should be backported since there is some behavior change.
History
Date User Action Args
2011-03-15 15:02:57rosslagerwallsetrecipients: + rosslagerwall, giampaolo.rodola, neologix, amicitas
2011-03-15 15:02:57rosslagerwallsetmessageid: <1300201377.47.0.174787830391.issue11459@psf.upfronthosting.co.za>
2011-03-15 15:02:56rosslagerwalllinkissue11459 messages
2011-03-15 15:02:56rosslagerwallcreate