Reticulate: Recover tests#11232
Merged
Merged
Conversation
|
E2E Tests 🚀 |
90b97e1 to
49b583f
Compare
seeM
approved these changes
Jan 7, 2026
seeM
left a comment
Contributor
There was a problem hiding this comment.
Nice fix, looks like it was a tough one!
Contributor
|
Oh wow! Nice to see this PR. If you don't mind I'm going to add the @:web tag as well and kick off again. Just to be doubly sure... |
midleman
approved these changes
Jan 7, 2026
midleman
left a comment
Contributor
There was a problem hiding this comment.
Awesome! Will keep an eye on how these tests perform over time since they used to give us so much trouble.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR overrides the default
post_handler_hookandpre_handler_hookin the IPyKernel instance, so that exceptions from executing it are not raised withexc_info=True.Those hooks were added in ipython/ipykernel#49 to allow customizing the signal behaviors.
Later, they started being executed in a try context and exceptions: ipython/ipykernel#360
Their code hasn't changed in the last 10 years, so it seems safe to override them like this.
Addresses #10953
The problem we are trying to solve described in #10953 is that in Reticulate sessions on Linux, some execute requests hang, causing the kernel to be completely unresponsive.
I'm not entirely sure why this fix works, but here's the hypothesis:
pre_handler_hookwhich fails in reticulate (because you can't signal from the main thread)self.log.debug("Unable to signal in pre_handler_hook:", exc_info=True)OutStream, which will eventuallyflush.The hypothesis is that larger tracebacks, makes the IO thread queue larger, which makes more likely that flushing times out.
Release Notes
New Features
Bug Fixes
QA Notes
@:reticulate @:web