New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glob returns results in undeterministic order #74646
Comments
because POSIX readdir does not guarantee any order Some background: Many python modules build their .so files from a glob.glob(path, "*.cpp") The old glob behaviour would often lead to the linker See also https://reproducible-builds.org/ on that topic. There are plenty affected packages out there |
From my performance measurements, the overhead was negligible (not even counting the processing done on files returned by glob). And also glob in C, bash, perl all do sort by default and these are generally pretty fast languages, yet they still chose consistency over performance. I updated my PR to also update the documentation accordingly. |
Sorry, we're going to reject this patch for the reasons discussed in the two other referenced patches. If a user wants sorted order, they can effortlessly specify that with sorted(glob('*.cpp')). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: