ipython / ipython/ipykernel

Standardization of API provided to the Python runtime

Open
#475 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
734
Forks
411
Avg merge
1d 5h
Merged PRs (30d)
8

Description

With the new Python kernels which are now arising, it may be interesting to define a scoped API that a Python kernel must make available for the Python runtime.

For example, xeus-python monkey-patches IPython.display, IPython.clear_output, etc... I just opened https://github.com/jupyter-widgets/ipywidgets/issues/2665 in ipywidgets to list the IPython and ipykernel APIs that we are using and may be included in this limited API.

Instead of monkey-patching and using the IPython module, a way to go may be for the kernel to dynamically create a "kernel" python module that has all these functions...

This somewhat goes along the lines of @Carreau's remark on points of convergence between ipykernel and xeus-python:

If users needs to switch between ipykernel and Xeus-python depending on wether they want to use a given magic or the debugger the experience will be sub-par. If we have to choose, a clear distinction of features would be better than two almost similar projects.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked ipywidgets issue 2665 and comparing the IPython and ipykernel APIs used by xeus-python. Define the scope and compatibility requirements for a shared Python-kernel API, including whether a dynamically created kernel module is appropriate; the work is done when the API boundary and adoption path are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.