Re: Proposal: Drop GDB support for Python versions < 2.6

Kevin Buettner
2019-02-21T06:39:20Z

On Thu, 21 Feb 2019 00:28:48 +0100
André Pönitz <apoenitz@t-online.de> wrote:

> On Wed, Feb 20, 2019 at 03:11:45PM -0700, Kevin Buettner wrote:
> > On Wed, 20 Feb 2019 21:44:39 +0000
> > Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
> >
> > > Actually, I'd even be fine with more radical move, dropping support
> > > for 2.x altogether. Python 2.7 support will end in less a year
> > > from now anyway.
> >
> > I'm not ready to drop support for all of 2.X.
>
> Out of curiosity: Why?
>
> I.e. are there realistic scenarios where people actively use GDB's Python
> interface (in this context here I am tempted to call it a fairly "recent"
> addition to GDB, the first commit seems to be dated Aug 6, 2008), but are
> not able to use it with Python 3.x (3.0 released on Dec 3, also 2008)?

I think so. See Eli's reply in this thread.

When I build GDB on Fedora, I get a gdb enabled for python 2.7 unless
I take measures (via --with-python=/usr/bin/python3) to use python 3.X
instead.

I just checked three recent linux distro releases: Mint 19.1, Debian 9.8, and
Fedora 29. For each of them, running "python --version" shows that they're
all Python 2.7.X. Python 3 is often available, but you have to use the
python3 command to use it.

Checking my CentOS 7.6 box, I find that Python 2.7.5 is installed, but
Python 3 is not. However, I see that I could install some version of
Python 3 if I needed it. (I'm not using this machine for development.)

I think we can drop Python 2.7 (and lower) sometime after the major
Linux distributions start defaulting to python 3.X for the "python"
command.

Kevin