Repository navigation
Optimize kitty graphics detection on platforms (without psutil support) - #15424
Merged
Merged
Conversation
1MLightyears
marked this pull request as ready for review
October 19, 2026 08:19
Contributor
Author
|
As the author of #15419 does not reply, I could only merge main before making any adaptions to other ongoing PRs. |
E.g. Android/Termux platform can now use `/proc/self` to find parent shell. psutil is not fully supported on Android/Termux, so it is not a hard dependency on it now. For platforms that definitely provide no `/proc`, such as Windows, an early exit is prepared.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
This was referenced Oct 31, 2026
Carreau
pushed a commit
that referenced
this pull request
Nov 2, 2026
Commit b7a6320 (#15424) dropped the import-time evaluation of supports_kitty_graphics to keep process-tree walks out of startup, which removed the name from the module namespace; downstream code such as sagemath still imports it. Resolve it on access through a PEP 562 module __getattr__ instead: `from IPython.core.kitty import supports_kitty_graphics` works again while startup stays free of the detection cost. Fixes #15460 🤖 This contribution was drafted with AI assistance; the analysis, the change and the tests are described above so that they can be reviewed. Co-authored-by: Weijian He <230282609+Madin-H23@users.noreply.github.com>
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.
E.g. Android/Termux platform can now use
/proc/selfto find parent shell. psutil is not fully supported on Android/Termux, so it is not a hard dependency on it now.For platforms that definitely provide no
/proc, such as Windows, an early exit is prepared.Resolves #15422 .