fix: don't let kitty graphics detection crash IPython startup
_supports_kitty_graphics() walks the process tree with psutil at import time to detect a graphics-capable terminal. On shared multi-user systems where /proc is mounted with hidepid (common on HPC clusters), reaching an ancestor process owned by another user raises psutil.AccessDenied, which was unhandled and aborted the entire `import IPython`. Catch psutil/OS errors during the walk and treat them as "graphics unsupported" instead. A real supported terminal is one of the user's own near ancestors and is found before any restricted PID, so detection capability is unchanged.
C
Chris Burr committed
00bcdeedddbdbf57be165b750f5bb0b3e5eb9799
Parent: 60f2e26
Committed by M Bussonnier <bussonniermatthias@gmail.com>
on 6/25/2026, 7:16:16 AM