Proposal to remove Python 2 support

Joel Brobecker
Wed Sep 16 15:23:29 GMT 2020

> > I don't know how long this is going to be True, but "distros" have
> > been shipping Python 3.x for quite a while now, so lack of Python 2
> > support wouldn't prevent you from building GDB with Python support
> > enabled.
> But a user might potentially have a significant body of Python 2 code
> that they run through GDB, so it's not as simple as "just" building
> with Python 3 and off they go.

That is true, and I understand that. I have been involved in quite
a few transitions from Python 2 to Python 3, and it's been a lot
of work for a number of projects.

That being said, we need to be careful and try to find the right
balance between the users who are still stuck on Python 2, those
who have made the effort to transition in time, and the cost of
keeping Python 2 support for a little longer. If the cost remains
reasonable, then of course, let's help everyone.

Here, what we are talking about, is the fact that keeping Python 2
support would delay the implementation of a feature (or force us
to implement it in a way that's more complex -- something I don't
think Tom is interested in doing).

The question therefore is: Do we wait a little more to see what
entities outside our community decide to do re: Python 2.x support,
at the cost of delaying some features and improvements?

I don't have a strong opinion on this. My feeling is that the end
of Python 2.x is something we have known about for a very long time,
and those still stuck on it have a workaround: They can continue
using older versions of GDB.

> I think once distros start to drop Python 2 then there's a really good
> argument that GDB should drop Python 2 also, but before then we need
> to go in with our eyes open, if the distros still ship Python 2 then
> users might be annoyed if they have to rewrite their scripts.


More information about the Gdb mailing list