* [PR PATCH] python3-prompt_toolkit: disable workaround for ipython 8.18
@ 2023-12-01 11:13 tornaria
2023-12-01 15:33 ` [PR PATCH] [Merged]: " ahesford
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tornaria @ 2023-12-01 11:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]
There is a new pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages prompt_toolkit
https://github.com/void-linux/void-packages/pull/47516
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
Since the update to `prompt_toolkit-3.0.41_1` we get:
```
$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.1, Release Date: 2023-08-20 │
│ Using Python 3.12.0. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
/usr/lib/python3.12/site-packages/prompt_toolkit/application/application.py:988: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
```
This is due to https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1811, which works around an issue with ipython <= 8.17. Since we already ship ipython 8.18 we can safely remove the workaround.
Note that I proposed this upstream and I was asked to do a PR, the patch here is taken from https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1821.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
Cc: @ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/47516.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-prompt_toolkit-47516.patch --]
[-- Type: text/x-diff, Size: 2580 bytes --]
From 3255015be50e64edb14274a907ded48b421ee372 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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 0000000000000..ac752dc75b83c
--- /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?= <tornaria@cmat.edu.uy>
+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 b0ecc731388e5..6e60d8daa6c6f 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"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Merged]: python3-prompt_toolkit: disable workaround for ipython 8.18
2023-12-01 11:13 [PR PATCH] python3-prompt_toolkit: disable workaround for ipython 8.18 tornaria
@ 2023-12-01 15:33 ` ahesford
2023-12-12 14:11 ` tornaria
2023-12-12 14:12 ` ahesford
2 siblings, 0 replies; 4+ messages in thread
From: ahesford @ 2023-12-01 15:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2489 bytes --]
There's a merged pull request on the void-packages repository
python3-prompt_toolkit: disable workaround for ipython 8.18
https://github.com/void-linux/void-packages/pull/47516
Description:
See:
https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1811#issuecomment-1827043359 https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1821
Since the update to `prompt_toolkit-3.0.41_1` we get:
```
$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.1, Release Date: 2023-08-20 │
│ Using Python 3.12.0. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
/usr/lib/python3.12/site-packages/prompt_toolkit/application/application.py:988: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
```
This is due to https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1811, which works around an issue with ipython <= 8.17. Since we already ship ipython 8.18 we can safely remove the workaround.
Note that I proposed this upstream and I was asked to do a PR, the patch here is taken from https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1821.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
Cc: @ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: python3-prompt_toolkit: disable workaround for ipython 8.18
2023-12-01 11:13 [PR PATCH] python3-prompt_toolkit: disable workaround for ipython 8.18 tornaria
2023-12-01 15:33 ` [PR PATCH] [Merged]: " ahesford
@ 2023-12-12 14:11 ` tornaria
2023-12-12 14:12 ` ahesford
2 siblings, 0 replies; 4+ messages in thread
From: tornaria @ 2023-12-12 14:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/47516#issuecomment-1852113380
Comment:
@ahesford: just to mention that prompt_toolkit 3.0.42 has been released. In addition to including the 1821 patch from this PR, it also includes another PR of mine that it seems will make our dont-handle-sigint patch unnecessary. If you are not in a hurry to merge this I'll test it with sagemath and make a PR later this week (maybe on the weekend).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: python3-prompt_toolkit: disable workaround for ipython 8.18
2023-12-01 11:13 [PR PATCH] python3-prompt_toolkit: disable workaround for ipython 8.18 tornaria
2023-12-01 15:33 ` [PR PATCH] [Merged]: " ahesford
2023-12-12 14:11 ` tornaria
@ 2023-12-12 14:12 ` ahesford
2 siblings, 0 replies; 4+ messages in thread
From: ahesford @ 2023-12-12 14:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/47516#issuecomment-1852116874
Comment:
No rush; ping me when ready.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-12 14:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-01 11:13 [PR PATCH] python3-prompt_toolkit: disable workaround for ipython 8.18 tornaria
2023-12-01 15:33 ` [PR PATCH] [Merged]: " ahesford
2023-12-12 14:11 ` tornaria
2023-12-12 14:12 ` ahesford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).