From fdd09ec048397af2c4288812f5647e15c72eb5b6 2024-12-11 12:24:00 From: M Bussonnier Date: 2024-12-11 12:24:00 Subject: [PATCH] cleanup payloadpage (#14613) --- 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