pyflowgraph icon indicating copy to clipboard operation
pyflowgraph copied to clipboard

Kernel broken on IPython v7.0

Open epatters opened this issue 7 years ago • 3 comments

Our custom IPython kernel is broken on IPython v7.0 and later. Because the IPython team dropped Python 2.7 support in that release, they were able to adopt asyncio in the kernel. The kernel API now uses coroutines.

By far the simplest fix is to just drop our own Python 2.7 support for the kernel. (We can retain Python 2.7 compatibility in other parts of the codebase.)

epatters avatar Oct 19 '18 20:10 epatters

+1 for dropping support for 2.7

ioana-blue avatar Oct 19 '18 20:10 ioana-blue

I'm postponing fixing this not-too-important feature.

It will be less trivial than I initially hoped because asynchronicity has been push all the way down the stack, including into IPython's InteractiveShell, making it hard to activate the tracer at the right time by overriding methods. Instead, I think I will have to use the InteractiveShell's ast_transformers to wrap the user code in a Tracer context mananger. I'm noting this for future reference.

epatters avatar Oct 20 '18 02:10 epatters

With the arrival of #19, this should be easier to fix. We no longer need to call sys.settrace at just the right moment. We just need to install our AST transformers, which IPython already allows.

epatters avatar Nov 14 '18 19:11 epatters