From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39035 invoked by alias); 21 Feb 2019 18:52:32 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 39014 invoked by uid 89); 21 Feb 2019 18:52:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.2 spammy=H*f:sk:1e11ab8, UD:sys.version, produe, timimg X-HELO: mx2.freebsd.org Received: from mx2.freebsd.org (HELO mx2.freebsd.org) (8.8.178.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Feb 2019 18:52:30 +0000 Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 6DAE494084; Thu, 21 Feb 2019 18:52:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91B448879D; Thu, 21 Feb 2019 18:52:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 1BBCCCF15; Thu, 21 Feb 2019 18:52:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: Proposal: Drop GDB support for Python versions < 2.6 To: =?UTF-8?B?QW5kcsOpIFDDtm5pdHo=?= , Kevin Buettner Cc: gdb@sourceware.org References: <20190220134506.13960235@f29-4.lan> <1e11ab8bf081211e6cd21f052244c834cd0f21e4.camel@fit.cvut.cz> <20190220151145.04ca21c2@f29-4.lan> <20190220232848.GB30732@klara.mpi.htwm.de> <20190220233915.30b52f4c@f29-4.lan> <20190221183729.GA2024@klara.mpi.htwm.de> From: John Baldwin Openpgp: preference=signencrypt Message-ID: <473b7a52-de78-d11a-7471-c9a7593fe21c@FreeBSD.org> Date: Thu, 21 Feb 2019 18:52:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190221183729.GA2024@klara.mpi.htwm.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91B448879D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00053.txt.bz2 On 2/21/19 10:37 AM, André Pönitz wrote: > On Wed, Feb 20, 2019 at 11:39:15PM -0700, Kevin Buettner wrote: >> On Thu, 21 Feb 2019 00:28:48 +0100 >> André Pönitz 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 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. > > I saw it after I wrote my mail. > >> 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. > > I am not sure that the name of the python command is a good indicator > for the timimg of the dropping support for Python 2.x: > > First, the version of Python used for 'python' is technical, and in a few > cases also practically to the version of Python GDB uses. E.g. on some Ubuntu > machine here I see something like: > > ~ > gdb -batch -ex 'import sys' -ex 'py print(sys.version)' > 3.6.7 (default, Oct 22 2018, 11:32:17) > > ~ > python --version > 2.7.15rc1 > > ~ > python3 --version > 3.6.7 > > Second, there might be reasons for a distribution to never change the name > of the python command, i.e. always keep it at e.g. 'python3', with no > 'python' provided even after the distribution drops Python 2.x, so waiting > for a 'python --version' to produe 3.x might as well mean 'never'. On the other hand, there is a notion of "what is the default python version most packages use". On FreeBSD this is still python 2.7 as well for many things, though you can request python3 (e.g. for gdb there are 'gdb' and 'gdb-py3' packages where the first (default) one uses 2.7). I agree that 'python' might stay 2.7 forever due to legacy compat reasons, but I think the metric of when distributions start preferrring python3 by default for various other packages isn't a bad metric. -- John Baldwin                                                                            Â