scandir has been included in the Python 3.5 standard library as os.scandir(). So some packages use it for compatibility with python 2.7.
scandir() is a directory iteration function like os.listdir(), except that instead of returning a list of bare filenames, it yieldsDirEntry 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. Needed as dependency for devel/py-pathlib2 (coming in the next mail), used by the new devel/py-test version 3.7.1 (not yet committed) as a compatibility dependency with python 2.7. I sent the patch to upstream to see if the want it. The main issue was discussed here: https://marc.info/?l=openbsd-ports&m=153356569115686 It has been tested in i386 and amd64, if someone could test in others architectures would be great. You just need to run "make test" with python 2 + devel/py-unittest2 or "env FLAVOR=python3 make test" with python 3. Cheers. Elias.
py-scandir.tar.gz
Description: GNU Zip compressed data