Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msqiq-00039I-0o for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Dec 2021 18:22:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msqio-0005iT-CB for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Dec 2021 18:22:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msqio-0005iK-2X for pgsql-hackers@lists.postgresql.org; Thu, 02 Dec 2021 18:22:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msqil-0007M4-UP for pgsql-hackers@postgresql.org; Thu, 02 Dec 2021 18:22:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1B2IMDTe2115893; Thu, 2 Dec 2021 13:22:13 -0500 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: Replace uses of deprecated Python module distutils.sysconfig In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Thu, 02 Dec 2021 08:20:48 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2115891.1638469333.1@sss.pgh.pa.us> Date: Thu, 02 Dec 2021 13:22:13 -0500 Message-ID: <2115892.1638469333@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > With Python 3.10, configure spits out warnings about the module > distutils.sysconfig being deprecated and scheduled for removal in Python > 3.12: Bleah. > This patch changes the uses in configure to use the module sysconfig > instead. The logic stays the same. (It's basically the same module but > as its own top-level module.) > Note that sysconfig exists since Python 2.7, so this moves the minimum > required version up from Python 2.6. That's surely no problem in HEAD, but as you say, it is an issue for the older branches. How difficult would it be to teach configure to try both ways, or adapt based on its python version check? > I suggest leaving the backbranches alone for now. At the moment, we > don't even know whether additional changes will be required for 3.12 > (and 3.11) support, so the overall impact isn't known yet. In a few > months, we will probably know more about this. Agreed, this is a moving target so we shouldn't be too concerned about it yet. regards, tom lane