From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23390 invoked by alias); 30 May 2018 22:26:35 -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 23357 invoked by uid 89); 30 May 2018 22:26:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=HTo:U*pkoning, 3x, UD:3.x, 3.x X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 May 2018 22:26:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2A9CE560B5; Wed, 30 May 2018 18:26:31 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1DGaV4cDqc9f; Wed, 30 May 2018 18:26:31 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 008CB560AD; Wed, 30 May 2018 18:26:30 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 1E70B83056; Wed, 30 May 2018 15:26:29 -0700 (PDT) Date: Wed, 30 May 2018 23:05:00 -0000 From: Joel Brobecker To: Phil Muldoon , Paul Koning Cc: "gdb@sourceware.org" Subject: Re: GDB fails to build with Python 3.7 Message-ID: <20180530222629.642gog77pan2uzm5@adacore.com> References: <5e55cd3c-7ccd-4cce-5297-ddddadf91975@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e55cd3c-7ccd-4cce-5297-ddddadf91975@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-05/txt/msg00822.txt.bz2 Hi Paul, > Currently GDB fails to build with Python 3.7 > > https://bugs.python.org/issue33470 > > This is because we use an internal Python API: > > #ifdef IS_PY3K > gdb_module = PyModule_Create (&python_GdbModuleDef); > /* Add _gdb module to the list of known built-in modules. */ > _PyImport_FixupBuiltin (gdb_module, "_gdb"); > #else > gdb_module = Py_InitModule ("_gdb", python_GdbMethods); > #endif > > (the _PyImport_FixupBuiltin in python.c). > > This internal API has been changed. According to the advice of the Python > maintainers we should never have used it in the first place. I didn't > add this (at least I don't think I did!), so I'm asking whomever > authored that code to please change it to be 3.7 compatible. I'm not > sure what the code achieves so I'm reluctant to touch it in case of > breakages on platforms I don't have easily access to. >From what I can tell, this was was introduced when you added Python 3.x support, back in 2012: commit 9a27f2c60d760a95a27e336750f26f69f91dd156 Date: Wed Dec 12 16:47:30 2012 +0000 Subject: Add support for Python 3 Do you remember why you added that _PyImport_FixupBuiltin call? If not, I suggest we just remove it and re-run the testsuite. If we find regressions, then we'll have our answer. If we don't, let's just remove the code, and see whether anyone finds something. -- Joel