Message185619
This issue is a split from #5492, where Terry noticed a serious regression that "quit()" and "exit()" no longer work in IDLE.
Before #9290, the PyShell object itself was stdin and it didn't have a "fileno" method. The code in site.py would skip over the call to fileno, leaving fd == -1, which then called close() on stdin, effectively the close() method of PyShell.
The application of #9290 introduced PseudoFile as a subclass of io.TextIOBase which has a "fileno" method. The site.py code find it, calls it, but an error gets raised so that the close() method doesn't get called. Even if you subclass fileno(), you still need to subclass close() so that it calls the original close function in PyShell.
The attached patch, fileno_close.patch, fixes that issue. I would argue that this patch should be applied to all the release candidates as it corrects a serious regression.
I would like to hear your thoughts before applying the patch. |
|
Date |
User |
Action |
Args |
2013-03-31 07:45:00 | roger.serwy | set | recipients:
+ roger.serwy, terry.reedy |
2013-03-31 07:45:00 | roger.serwy | set | messageid: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> |
2013-03-31 07:44:59 | roger.serwy | link | issue17585 messages |
2013-03-31 07:44:59 | roger.serwy | create | |
|