[Checkins] SVN: z3c.autoinclude/trunk/src/z3c/autoinclude/utils.py let `subpackageDottedNames` always return a sorted list of package names as `os.listdir` doesn't on some platforms. while this mainly fixes test failures as seen on linux (e.g. http://lists.plone.org/pipermail/testbot/2009-December/015364.html), returning the names in a predictable manner should also make sense in general...
Wichert Akkerman
wichert at wiggy.net
Thu Dec 10 03:25:18 EST 2009
On 2009-12-10 01:57, Andreas Zeidler wrote:
> Log message for revision 106361:
> let `subpackageDottedNames` always return a sorted list of package names as `os.listdir` doesn't on some platforms. while this mainly fixes test failures as seen on linux (e.g. http://lists.plone.org/pipermail/testbot/2009-December/015364.html), returning the names in a predictable manner should also make sense in general...
os.listdir does not return a sorted list on any platform. It uses the
ordering as returned by the OS, and no OS makes any guarantee about
ordering. Multiple calls of os.listdir can even return files in
different orders; this happens on filesystems which uses tree-based
directory indexes if they rebalance their tree.
Wichert.
--
Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
More information about the checkins
mailing list