-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
build: avoid using CMP for BZ2File #31198
Conversation
Some Python distributions do not support context manager protocol (CMP) for BZ2File.
Marked as author ready. I do not think we have any CI that could test this, so we should not require a CI run. |
/ping @nodejs/python |
Lite CI might be good just to make sure this doesn't break Jenkins in a surprising totally-unexpected way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking at exceptions in https://docs.python.org/3/library/contextlib.html, I no longer believe that the proposed change is equivalent to the current code. If shutil.copyfileobj() raises an exception, will inf.close() happen??
Lite CI seems to be not working right now. Going to run a full CI. |
Some Python distributions do not support context manager protocol (CMP) for BZ2File. PR-URL: #31198 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Christian Clauss <[email protected]>
Landed in bd6d651 Thanks for the contribution! 🎉 |
Some Python distributions do not support context manager protocol (CMP) for BZ2File. PR-URL: #31198 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Christian Clauss <[email protected]>
This looks like it needs a backport but it doesn't land cleanly at all - would someone from @nodejs/platform-windows be able to help since the original committer's account is gone now? |
Some Python distributions do not support
context manager protocol (CMP) for BZ2File.
Fixes #30949
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes