From 9c068a8354ecf65cd6645a7ac7f8fd474c2a4618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 27 Nov 2023 00:24:06 -0300 Subject: [PATCH] python3-prompt_toolkit: disable workaround for ipython 8.18 See: https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1811#issuecomment-1827043359 https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1821 --- ...-disable_workaround_for_ipython_8.18.patch | 23 +++++++++++++++++++ srcpkgs/python3-prompt_toolkit/template | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/python3-prompt_toolkit/patches/1821-disable_workaround_for_ipython_8.18.patch diff --git a/srcpkgs/python3-prompt_toolkit/patches/1821-disable_workaround_for_ipython_8.18.patch b/srcpkgs/python3-prompt_toolkit/patches/1821-disable_workaround_for_ipython_8.18.patch new file mode 100644 index 00000000000..ac752dc75b8 --- /dev/null +++ b/srcpkgs/python3-prompt_toolkit/patches/1821-disable_workaround_for_ipython_8.18.patch @@ -0,0 +1,23 @@ +From 55a45b1d19330a939d5df5a33671c10d52e11477 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= +Date: Mon, 27 Nov 2023 11:10:21 -0300 +Subject: [PATCH] Disable workaround for ipython >= 8.18 + +--- + src/prompt_toolkit/application/application.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/prompt_toolkit/application/application.py b/src/prompt_toolkit/application/application.py +index 726fc0a06..c07ea4e94 100644 +--- a/src/prompt_toolkit/application/application.py ++++ b/src/prompt_toolkit/application/application.py +@@ -960,7 +960,8 @@ def run_in_thread() -> None: + def _called_from_ipython() -> bool: + try: + return ( +- "IPython/terminal/interactiveshell.py" ++ sys.modules["IPython"].version_info < (8, 18, 0, "") ++ and "IPython/terminal/interactiveshell.py" + in sys._getframe(3).f_code.co_filename + ) + except BaseException: diff --git a/srcpkgs/python3-prompt_toolkit/template b/srcpkgs/python3-prompt_toolkit/template index b0ecc731388..6e60d8daa6c 100644 --- a/srcpkgs/python3-prompt_toolkit/template +++ b/srcpkgs/python3-prompt_toolkit/template @@ -1,7 +1,7 @@ # Template file for 'python3-prompt_toolkit' pkgname=python3-prompt_toolkit version=3.0.41 -revision=1 +revision=2 build_style=python3-module hostmakedepends="python3-setuptools" depends="python3-wcwidth"