Title: bpo-30461: glob: sort the resulting list by bmwiedemann · Pull Request #1794 · python/cpython · GitHub
Open Graph Title: bpo-30461: glob: sort the resulting list by bmwiedemann · Pull Request #1794 · python/cpython
X Title: bpo-30461: glob: sort the resulting list by bmwiedemann · Pull Request #1794 · python/cpython
Description: because POSIX readdir does not guarantee any order glob often gave unexpectedly random results. This change makes it behave similar to POSIX glob(3). 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("*.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. This change should not break existing software because there were no guarantees on ordering of glob results. Measurements with 'perf' show the new code to be 4ms / 1.07x slower (for /usr/*/* with 9854 files) The alternative would be to patch each package individually but that would be quite some effort and not be as nice to use as can be seen in https://www.riverbankcomputing.com/pipermail/pyqt/2017-May/039214.html and there are plenty others 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
Open Graph Description: because POSIX readdir does not guarantee any order glob often gave unexpectedly random results. This change makes it behave similar to POSIX glob(3). Some background: for openSUSE Linux we build pa...
X Description: because POSIX readdir does not guarantee any order glob often gave unexpectedly random results. This change makes it behave similar to POSIX glob(3). Some background: for openSUSE Linux we build pa...
Opengraph URL: https://github.com/python/cpython/pull/1794
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:02682825-a01a-5ea1-5bc5-896d2faa2bd6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9A2A:2831EF:2CD6AB:4EE7BA:6A506656 |
| html-safe-nonce | ad5d77a3cbd6bc6f2f840f627f2916673c3566c2c12217b19d4f38989315e410 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTJBOjI4MzFFRjoyQ0Q2QUI6NEVFN0JBOjZBNTA2NjU2IiwidmlzaXRvcl9pZCI6IjQ1NTgwNDcxNjU3ODg3NDMyNTQiLCJyZWdpb25fZWRnZSI6Indlc3R1czIiLCJyZWdpb25fcmVuZGVyIjoid2VzdHVzMiJ9 |
| visitor-hmac | 6eca5a8e9f7532ed19c57a0148341d20a755c8c544a57e9beb4ea6a6ef12da90 |
| hovercard-subject-tag | pull_request:122304218 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/1794/files |
| twitter:image | https://avatars.githubusercontent.com/u/637990?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/637990?s=400&v=4 |
| og:image:alt | because POSIX readdir does not guarantee any order glob often gave unexpectedly random results. This change makes it behave similar to POSIX glob(3). Some background: for openSUSE Linux we build pa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width