jupyter / jupyter_client

Jupyter protocol client APIs
https://jupyter-client.readthedocs.io
BSD 3-Clause "New" or "Revised" License
390 stars 284 forks source link

Clarification of `history_request` status and future plans #976

Open krassowski opened 1 year ago

krassowski commented 1 year ago

history_request is currently described as not in use in the main notebook interface and says that some options may be removed in the future (in a note added 7 years ago).

https://github.com/jupyter/jupyter_client/blob/6ea71188141b9098be5dbe2de9af807c9fbb6b2a/docs/messaging.rst?plain=1#L805-L813

While the above is true as of today, two pull request against JupyterLab propose exposing the history information in the notebook interface (which will likely propagate to Jupyter Notebook v7.x) as opt-in features:

The former uses the same request as presently implemented in JupyterLab console:

{
  output: false,
  raw: true,
  hist_access_type: 'tail',
  n: 500
}

and the latter makes use of search function:

{
  output: false,
  raw: true,
  hist_access_type: 'search',
  pattern: linePrefix + '*',
  unique: true,
  n: this._maxSuggestions
}

Aside: I find the pattern option specification a bit unclear e.g. whether there are escaping characters which would allow to escape . and * wildcards.

Once these pull requests are merged and released, the history request API will gain more prominence and more kernels will want to implement it. It might be then harder to change the APIs.

  1. Which options were planned for removal? Should those be deprecated? Are those any of options proposed in the pull requests mentioned above?
  2. Are there any other changes/addition that we want to expose out of IPython?
krassowski commented 1 year ago

CC @andrewfulton9 @Carreau