public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ipython] rawhide: Fix compatibility with Python 3.15 beta 1
@ 2026-06-03 9:55 Lumir Balhar
0 siblings, 0 replies; only message in thread
From: Lumir Balhar @ 2026-06-03 9:55 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ipython
Branch : rawhide
Commit : 74dec535831b954812811f190e05b8d50082ac70
Author : Lumir Balhar <lbalhar@redhat.com>
Date : 2026-05-22T13:38:15+02:00
Stats : +49/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ipython/c/74dec535831b954812811f190e05b8d50082ac70?branch=rawhide
Log:
Fix compatibility with Python 3.15 beta 1
---
diff --git a/15220.patch b/15220.patch
new file mode 100644
index 0000000..df18cb8
--- /dev/null
+++ b/15220.patch
@@ -0,0 +1,45 @@
+From c13a2a6e8cc43a6cb0bd068d0809ee26d65972a2 Mon Sep 17 00:00:00 2001
+From: Lumir Balhar <lbalhar@redhat.com>
+Date: Fri, 22 May 2026 13:35:19 +0200
+Subject: [PATCH] Fix %debug and ipdb with Python 3.15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Python 3.15 introduced PyREPL as the default pdb input backend
+(via _maybe_use_pyrepl_as_stdin()), which temporarily sets
+use_rawinput=False before calling cmdloop(). IPython's TerminalPdb
+raises ValueError when it sees use_rawinput=False.
+
+Override _cmdloop() in IPython.core.debugger.Pdb to bypass the
+PyREPL wrapping — IPython already has its own input handling via
+prompt_toolkit and doesn't need PyREPL.
+
+Fixes: https://github.com/ipython/ipython/issues/15217
+---
+ IPython/core/debugger.py | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py
+index 4afd86427de..05c839272d9 100644
+--- a/IPython/core/debugger.py
++++ b/IPython/core/debugger.py
+@@ -515,6 +515,18 @@ def do_exceptions(self, arg):
+ else:
+ self.error("No exception with that number")
+
++ def _cmdloop(self):
++ # Override to bypass Python 3.15's _maybe_use_pyrepl_as_stdin(), which
++ # sets use_rawinput=False and conflicts with IPython's own input handling.
++ while True:
++ try:
++ self.allow_kbdint = True
++ self.cmdloop()
++ self.allow_kbdint = False
++ break
++ except KeyboardInterrupt:
++ self.message("--KeyboardInterrupt--")
++
+ def interaction(self, frame, tb_or_exc):
+ try:
+ if CHAIN_EXCEPTIONS:
diff --git a/ipython.spec b/ipython.spec
index a998207..3412d84 100644
--- a/ipython.spec
+++ b/ipython.spec
@@ -27,6 +27,10 @@ License: BSD-3-Clause AND MIT
URL: http://ipython.org/
Source0: %pypi_source
+# Fix %%debug and ipdb with Python 3.15 (PyREPL conflicts with IPython's input handling)
+# https://github.com/ipython/ipython/issues/15217
+Patch: https://github.com/ipython/ipython/pull/15220.patch
+
# Unset -s on python shebang - ensure that packages installed with pip
# to user locations are seen and properly loaded.
%undefine _py3_shebang_s
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-03 9:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-03 9:55 [rpms/ipython] rawhide: Fix compatibility with Python 3.15 beta 1 Lumir Balhar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox