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 https://github.com/pytries/datrie/blob/master/setup.py#L10 https://github.com/jonashaag/bjoern/blob/master/setup.py#L6 https://github.com/scipy/scipy/blob/master/scipy/sparse/linalg/dsolve/setup.py#L28 ---------- 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 <rep...@bugs.python.org> <http://bugs.python.org/issue30461> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com