Re: [PATCH v1] py-gdb-readline: replace deprecated interfaces in GdbRemoveReadlineFinder
Tom de Vries <[email protected]> Wed, 5 Aug 2026 17:00:50 +0200
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/26 3:17 PM, Tom de Vries wrote: > On 1/13/26 5:25 PM, Tom Tromey wrote: >>>>>>> "Matthieu" == Matthieu Longo <[email protected]> writes: >> >> Matthieu> A previous patch [1] enabled readline in Python in a GDB- >> specific way >> Matthieu> and blocked the standard Python readline module to prevent >> conflicts >> Matthieu> with GDB by adding a custom importer raising an exception >> for the readline >> Matthieu> module. >> >> I wonder if gdb could do better here. To be clear, not your problem. >> >> Matthieu> This patch uses Patryk Sondej's approach detailed in bug >> 32473, but with >> Matthieu> a slight variation regarding the finder insertion in >> sys.meta_path. >> Matthieu> It also adds a new test to prevent future regression. >> >> Seems reasonable to me, though this isn't an area I know very well. >> >> Approved-By: Tom Tromey <[email protected]> > > I reproduced this regression on the gdb-17-branch with python 3.6 (and > later as well), and can confirm that backporting the patch to the > gdb-17-branch fixes it. > > I'm not able to test with python 3.4 though, otherwise I would apply it > to the branch. > I remembered I had a leap 42.3 container, with system python 3.4. It has gcc 4.8.5, so I can't build gdb-17-branch, so instead I build gdb-14-branch. The problem reproduces, and backporting the patch (applies cleanly) fixes it. So now that I know that I'm not breaking something for python 3.4, I'll proceed with the backport. Thanks, - Tom > Thanks, > - Tom > >> >> Tom >