From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20276 invoked by alias); 9 Dec 2013 10:39:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20261 invoked by uid 89); 9 Dec 2013 10:39:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Dec 2013 10:39:15 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB9Ad649015799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Dec 2013 05:39:06 -0500 Received: from localhost.localdomain (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rB9Ad59B025480; Mon, 9 Dec 2013 05:39:05 -0500 Message-ID: <52A59DC8.2050906@redhat.com> Date: Mon, 09 Dec 2013 10:39:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: Doug Evans , gdb-patches@sourceware.org Subject: Re: [PATCH] Add some const-ness to py-cmd.c References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00326.txt.bz2 On 08/12/13 08:04, Doug Evans wrote: > Hi. > > When can we drop support for older Python versions? > > 2013-12-08 Doug Evans > > * python/py-cmd.c (struct cmdpy_completer): Add comment. > (completers): Make const. > > diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c > index c0e9d96..c845c7c 100644 > --- a/gdb/python/py-cmd.c > +++ b/gdb/python/py-cmd.c > @@ -32,13 +32,15 @@ > /* Struct representing built-in completion types. */ > struct cmdpy_completer > { > - /* Python symbol name. */ > + /* Python symbol name. > + This isn't a const char * for Python 2.4's sake. > + PyModule_AddIntConstant only takes a char *, sigh. */ > char *name; > /* Completion function. */ > completer_ftype *completer; > }; > > -static struct cmdpy_completer completers[] = > +static const struct cmdpy_completer completers[] = > { > { "COMPLETE_NONE", noop_completer }, > { "COMPLETE_FILENAME", filename_completer }, > It's really up to our downstream packagers. It can't be soon enough for me. I spend an inordinate amount of time checking my code (both C and Python works on 2.4 -> 3.x). It is really a time consuming and tedious task. My thoughts are that from GDB version x.x, we declare from then on we only support Python 3.x, and if your distribution does not support Python 3.x to revert GDB to an older version. I suspect though that his would encounter some resistance from the folks who work in the enterprise sector, as I doubt various enterprise systems have updated to Python 3.x. tl;dr We should probably ask around. Cheers, Phil