[New-bugs-announce] [issue30461] glob returns results in undeterministic order

Bernhard M. Wiedemann report at bugs.python.org
Wed May 24 15:29:31 EDT 2017

New submission from Bernhard M. Wiedemann:

because POSIX readdir does not guarantee any order
glob often gives unexpectedly random results.

Some background:
for openSUSE Linux we build packages in the Open Build Service (OBS)
which tracks dependencies, so when e.g. a new glibc is submitted,
all packages depending on glibc are rebuilt
and if those depending binaries changed,
the new version is pushed to the mirrors.

Many python modules build their .so files from a glob.glob(path, "*.cpp")

The old glob behaviour would often lead to the linker
randomly ordering functions in resulting object files,
thus we were not able to auto-detect
that the package did not actually change
which wastes bandwidth of distribution mirrors and users.

See also https://reproducible-builds.org/ on that topic.

There are plenty affected packages out there

components: Library (Lib)
messages: 294381
nosy: bmwiedemann
priority: normal
severity: normal
status: open
title: glob returns results in undeterministic order
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list