Message190714
Fixing IO leak resource would fix this bug but leave another bug opened which I try to fix as well.
These statements with Python3 under Linux will always fail because we need to open /dev/tty file in binary mode (for whatever reason).
fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
tty = os.fdopen(fd, 'w+', 1)
So I guess the correct fix would be to open /dev/tty in binary mode (and set buffering off) and go on from there.
Of course, one can argue whether this bug should be separated from the original bug (resource warning). I am not sure either.
Anyway, here is the patch that will work with stream StringIO and stdout.
Thank you for Serhiy for pointing out my mistakes. |
|
Date |
User |
Action |
Args |
2013-06-06 13:48:39 | vajrasky | set | recipients:
+ vajrasky, pitrou, benjamin.peterson, stutzbach, alex, nikratio, hynek, serhiy.storchaka |
2013-06-06 13:48:39 | vajrasky | set | messageid: <1370526519.66.0.217698195779.issue18116@psf.upfronthosting.co.za> |
2013-06-06 13:48:39 | vajrasky | link | issue18116 messages |
2013-06-06 13:48:39 | vajrasky | create | |
|