-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Track KeyboardInterrupt protection per code object #1508
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1508 +/- ##
==========================================
- Coverage 99.67% 99.58% -0.09%
==========================================
Files 107 107
Lines 13245 13282 +37
Branches 1006 1013 +7
==========================================
+ Hits 13202 13227 +25
- Misses 28 35 +7
- Partials 15 20 +5
|
I like the overall approach. I wonder if we can simplify it though? In particular having 4 different protection states seems like a lot.
The trickier one is "This and its callees are not protected". As noted in #733, I'm not convinced that |
I also used it to remove one function call layer in
Agreed on both counts, except that I think we would need to apply this to
That's actually how it works here -- if you say @disable_ki_protection, then KI deliverability follows the contextvar. Probably the name should change at minimum. More discussion in #733, which I'm working on writing up a response to now. :-) |
Example implementation for the first idea from my comment on #733. Still somewhat unpolished (needs a newsfragment, doc updates, and additional tests) but I didn't want to put more work into it without feedback on the overall direction.