scandir() is a directory iteration function like os.listdir(), except that instead of returning a list of bare filenames, it yields DirEntry objects that include file type and stat information along with the name. Using scandir() increases the speed of os.walk() by 2-20 times (depending on the platform and file system) by avoiding unnecessary calls to os.stat() in most cases. scandir has been included in the Python 3.5 standard library as os.scandir(), and the related performance improvements to os.walk() have also been included. However, to bump dev-python/pathlib2 to the newest version, this package is required for Python 2.7. and Python 3.4.
https://github.com/gentoo/gentoo/pull/5207
Hi and thank you for your bug report. It looks like an awesome package to tinker with. I will add it shortly to the tree.
commit 21ed8befb71cb458f7a1e15738042d69dda8cddc (HEAD -> master, origin/master, origin/HEAD) Author: Marius Brehler <marbre@linux.sungazer.de> AuthorDate: Tue Jul 25 09:32:21 2017 +0200 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: Wed Jul 26 00:34:26 2017 +0200 dev-python/scandir: new package. A better directory iterator and faster os.walk(). scandir() is a directory iteration function like os.listdir(), except that instead of returning a list of bare filenames, it yields DirEntry objects that include file type and stat information along with the name. Using scandir() increases the speed of os.walk() by 2-20 times (depending on the platform and file system) by avoiding unnecessary calls to os.stat() in most cases. Required by dev-python/pathlib2[python2_7,python3_4]. Gentoo-Bug: https://bugs.gentoo.org/626120 Package-Manager: Portage-2.3.6, Repoman-2.3.1 Closes: https://github.com/gentoo/gentoo/pull/5207 dev-python/scandir/Manifest | 1 + dev-python/scandir/metadata.xml | 12 ++++++++++++ dev-python/scandir/scandir-1.5.ebuild | 23 +++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 dev-python/scandir/Manifest create mode 100644 dev-python/scandir/metadata.xml create mode 100644 dev-python/scandir/scandir-1.5.ebuild PR merged, thanks!
Thanks for merging it into the tree that quick!