[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Sorry about that... -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Larry Hastings
Larry Hastings added the comment: The 62b9bfbc3356 changeset does more than add the guard against invalid file handles; it also adds documentation to os.path.exists documenting that it now accepts path-as-int-fd. While this modification is fine in principle I would have preferred it was subm

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Many os functions started to accept file descriptors. > I don't know how many are available on Windows... On Windows os.stat() seems to be the only one: >>> os.supports_fd {} -- ___ Python tracker

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62b9bfbc3356 by Richard Oudkerk in branch 'default': Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open. http://hg.python.org/cpython/rev/62b9bfbc3356 -- nosy: +python-dev ___ Python tra

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Many os functions started to accept file descriptors. I don't know how many are available on Windows, but IMO _PyVerify_fd() could be used for all of them; it's a no-op macro on Unix anyway. -- nosy: +amaury.forgeotdarc, larry _

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: This can probably be fixed by using _PyVerify_fd(). -- ___ Python tracker ___ ___ Python-bugs-list

[issue15261] os.stat(fd) crashes on Windows if fd does not exist

2012-07-05 Thread Richard Oudkerk
New submission from Richard Oudkerk : In Python 3.3 (but not earlier) os.stat() is documented to work with file descriptors. (os.path.exists() also works with fds since it is implemented in terms of os.stat(), although that is *not* documented.) However, on Windows if fd is not open then os.s