Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-100762: Fix optimization in gen_close #111069
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
iritkatriel commented Oct 19, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
yf is NULL in gen_close in the cases where it is not DECREFedyf is NULL in gen_close in the cases where it is not DECREFedyf is NULL in the cases where it is not DECREFedUh oh!
There was an error while loading. Please reload this page.
markshannon commented Oct 24, 2023
This looks good. Just change the test. |
markshannon commented Oct 24, 2023
One minor efficiency improvement that could be made is to not call |
yf is NULL in the cases where it is not DECREFedcdce8p commented Feb 22, 2024
Would it be possible / make sense to cherry-pick this change onto For pylint / astroid we're seeing |
iritkatriel commented Feb 22, 2024
I think so. I'll make a PR. |
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
(cherry picked from commit 0db2517) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
GH-115818 is a backport of this pull request to the 3.12 branch. |
…GH-111069) (python#115818)" This reverts commit eb4774d.
In f02fa64 lines 383-389 were added, with returns that do not decref
yf. I think this is ok becauseyfis always NULL in these cases. Adding the assertions.Also, the optimization for the case of exception_handler_depth== 1 is not working because
op.codeis checked instead ofop.arg.