-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
release GIL in nt._isdir #71720
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
Comments
In Modules/posixmodule.c, the function os__isdir_impl calls GetFileAttributesA/GetFileAttributesW without releasing the GIL. This is problematic since it can result in disk or network I/O, depending on the filesystem. |
LGTM. This is the kind of patch I can't wait to have a one-click merge button... right now it'll have to wait until I have a clean repo. But if anyone else wants to get it, go ahead. |
Should this be backported to 2.7 posix__isdir()? |
No, it's not a security fix, so it doesn't go in 2.7. |
OK. I thought fixing bugs in 2.7 was at the discretion of core developers, including small tweaks for performance -- just not enhancements with significant amounts of new code and features. |
Maybe so. If you find a core developer who cares about performance in 2.7, maybe they'll merge it :) |
Correct, 2.7 is not in security fix only mode (yet), but new features (anything that changes an API) or bug fixes that we wouldn't put in a maintenance release (things that would break existing programs) are not allowed. A special exception has been made for 2.7 for performance enhancements; we wouldn't normally do those in a maintenance release unless they were significant. But as Steve says, it depends on a core developer being interested in applying the fix/backport. Which we may have, we'll wait and see :) |
New changeset ebf9a4c933e9 by Steve Dower in branch '3.5': New changeset 8823c660820e by Steve Dower in branch 'default': |
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: