Message237923
> Happy? :-)
No, it doesn't fix my example. :-(
I see following possibilities:
1. Partially revert the patch and always call path.islink(). I will not kill all the benefit of using os.scandir(), because there is a benefit from avoiding path.isdir() and in any case in large directories most content is usually files, not dirs.
2. Accept and document behavior change. This will break someone's code. :-(
3. Left os.walk as was (or only partially optimized as in 1), and add a new function with new behavior.
4. Add new boolean parameter that control behavior to os.walk().
5. Try to detect when dir list or filesystem were changed. Victor's patch does the first. For the second we can check if top directory inode and mtime were changed. But I afraid this wouldn't decrease a number of system calls. |
|
Date |
User |
Action |
Args |
2015-03-12 09:43:22 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, scott.dial, vstinner, benhoyt, python-dev |
2015-03-12 09:43:22 | serhiy.storchaka | set | messageid: <1426153402.66.0.354107816195.issue23605@psf.upfronthosting.co.za> |
2015-03-12 09:43:22 | serhiy.storchaka | link | issue23605 messages |
2015-03-12 09:43:22 | serhiy.storchaka | create | |
|