[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Well, the Windows bot is failing but not from test_fileio, so I'll go ahead and merge it. r68767. ___ Python tracker ___ _

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Applied in r68755. Will watch Windows. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure Windows has a valid fstat btw, I'll guess we'll see on the Windows buildbots (in that case, some code can be taken from posixmodule.c to emulate fstat behaviour...). Other than that, the patch looks fine to me. _

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Attaching new patch... Added file: http://bugs.python.org/file12791/raise_on_bad_fd2.patch ___ Python tracker ___ ___

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think EBADF is defined everywhere, so you can drop the defined() conditional. ___ Python tracker ___ ___ Py

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's a patch for _FileIO. -- keywords: +patch Added file: http://bugs.python.org/file12790/raise_on_bad_fd.patch ___ Python tracker ___ ___

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps io.open should be fixed, then? (or the _FileIO constructor) -- nosy: +pitrou ___ Python tracker ___

[issue4991] os.fdopen doesn't raise on invalid file descriptors

2009-01-18 Thread Benjamin Peterson
New submission from Benjamin Peterson : Since os.fdopen is now implemented with io.open, it doesn't use fdopen and check for invalid file descriptors. This isn't a huge issue since subsequent actions on the file will raise an error. -- components: Library (Lib) messages: 80125 nosy: benj