From 0b3e69dde27d3fe5eb97fcce5c38979fd4c8f0f6 2024-12-11 12:18:52 From: M Bussonnier Date: 2024-12-11 12:18:52 Subject: [PATCH] cleanup payloadpage --- diff --git a/IPython/core/payloadpage.py b/IPython/core/payloadpage.py index 4958108..ba2bca2 100644 --- a/IPython/core/payloadpage.py +++ b/IPython/core/payloadpage.py @@ -1,4 +1,3 @@ -# encoding: utf-8 """A payload based version of page.""" # Copyright (c) IPython Development Team. @@ -7,6 +6,9 @@ import warnings from IPython.core.getipython import get_ipython +# see https://github.com/ipython/ipykernel/issues/1304 +# this should be moved to ipykernel and removed in the long run. + def page(strng, start=0, screen_lines=0, pager_cmd=None): """Print a string, piping through a pager. @@ -37,15 +39,3 @@ def page(strng, start=0, screen_lines=0, pager_cmd=None): start=start, ) shell.payload_manager.write_payload(payload) - - -def install_payload_page(): - """DEPRECATED, use show_in_pager hook - - Install this version of page as IPython.core.page.page. - """ - warnings.warn("""install_payload_page is deprecated. - Use `ip.set_hook('show_in_pager, page.as_hook(payloadpage.page))` - """) - from IPython.core import page as corepage - corepage.page = page