ipykernel
ipykernel copied to clipboard
IPython Kernel for Jupyter
**Issue Description**: When using [ray](https://github.com/ray-project/ray) in a notebook, the prints from a ray future are coming in previous cell instead of the cell where the future is executed **To Reproduce**...
See: - https://github.com/ipython/ipykernel/actions/runs/13527491742/job/37801623045 - https://github.com/ipython/ipykernel/actions/runs/13527491742/job/37801624573 - https://github.com/ipython/ipykernel/actions/runs/13527491742/job/37801624996
I would like to change our event-loop integration with Trio's [guest mode](https://trio.readthedocs.io/en/stable/reference-lowlevel.html#using-guest-mode-to-run-trio-on-top-of-other-event-loops). Trio's guest mode also works on asyncio thanks to [aioguest](https://github.com/oremanj/aioguest/tree/master/aioguest). For it to work, we just need to...
#1110 introduced `OutStream` hooks, which are [stored in a thread-local variable](https://github.com/ipython/ipykernel/blob/700c26f29126d2ced5480f0314642b12cff0d493/ipykernel/iostream.py#L733) and [invoked in `_flush`](https://github.com/ipython/ipykernel/blob/700c26f29126d2ced5480f0314642b12cff0d493/ipykernel/iostream.py#L651). However, since `_flush` [usually runs in a background thread](https://github.com/ipython/ipykernel/blob/700c26f29126d2ced5480f0314642b12cff0d493/ipykernel/iostream.py#L611), the hooks only work when registered...
1. Since https://github.com/ipython/ipykernel/pull/1358 the coverage gets skipped as some Python versions fail 2. Even before it does not report the coverage correctly, for example at https://github.com/ipython/ipykernel/commit/90133b7ac4801fa2c192c86c76982aa3a086896a it shows " No...
I would be interesting to have a mode where ipykernel doesn't use IPython, similar to [xeus-python](https://github.com/jupyter-xeus/xeus-python)'s raw mode.
New major version are a good time to drop support for older versions. I thihnk 3.9 should not be an issue, I woudl argue for removal of 3.10 as well.
PR #1349 temporarily disabled 3 downstream individual test to get CI to green and detect potential new failures. Those failures should be investigated and properly fixed.