Message164290
I want to mark this as wontfix.
>>> os.listdir in os.supports_fd
True
The concept we're struggling with here: is the "fd" you pass in to os.listdir a "dir_fd"? I claim that it isn't. I'm trying to enforce the concept, in both the documentation and the code, that "dir_fd" is a directory fd *accompanying a path*. With listdir, it isn't accompanied by a path, it replaces the path. So I suggest it's not a "dir_fd", it's just an "fd" which by sheer coincidence happens to reference a directory.
I proposed making os.listdir accept dir_fd, and internally use open and listdir to emulate the behavior. But someone (Antoine?) rightly pointed out, this would break the guideline that POSIX os.* functions on Unix-y OSes are atomic.
I might go so far as to say this needs a documentation fix. But I won't condone any sort of code fix (like adding os.listdir to os.supports_dir_fd). |
|
Date |
User |
Action |
Args |
2012-06-28 20:03:46 | larry | set | recipients:
+ larry, Arfrever, hynek, serhiy.storchaka |
2012-06-28 20:03:46 | larry | set | messageid: <1340913826.46.0.696601959866.issue15217@psf.upfronthosting.co.za> |
2012-06-28 20:03:45 | larry | link | issue15217 messages |
2012-06-28 20:03:45 | larry | create | |
|