Repository navigation
Fix kernel lifecycle with warnings treated as errors - #1583
Open
JackyHsu-X wants to merge 2 commits into
Open
JackyHsu-X wants to merge 2 commits into
JackyHsu-X wants to merge 2 commits into
Conversation
Author
|
The minimum-dependency failure occurs before the new cases reach the kernel lifecycle checks: jupyter_core 5.1.0 emits its platformdirs migration warning during import, and the child interpreters deliberately use warnings-as-errors. The follow-up opts these two test functions into the documented Validation:
The remaining label gate requires a triage label such as OpenAI Codex prepared and ran this investigation, revision and validation; no independent human review is claimed. |
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1582.
Prepare the main thread's event loop before starting the kernel. Handle Python 3.12's implicit-loop deprecation by explicitly creating a loop, while preserving an existing loop. Make
IPythonKernel.do_shutdown()async, matching the base class and avoiding its synchronous-hook warning.Seven regression cases cover unset, cleared and preconfigured loops, both shutdown restart flags, and real stock-launcher startup, execution, shutdown replies and clean process exits with warnings-as-errors. The subprocess cases explicitly opt into
JUPYTER_PLATFORM_DIRS=1so jupyter_core 5.1.0's unrelated path-migration warning does not terminate imports. Their strict warning policy remains enabled.Validation:
No production code changed in the minimum-dependency follow-up. No dependency, lockfile or CI changes. The full platform/Python/GUI matrix was not run locally, and remote CI must run on the revised head. The separate triage-label gate needs a maintainer.
AI disclosure: OpenAI Codex generated the changes and ran the investigation and validation. No independent human review is claimed.