Re: Replace uses of deprecated Python module distutils.sysconfig - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Replace uses of deprecated Python module distutils.sysconfig
Date
Msg-id 2115892.1638469333@sss.pgh.pa.us
Whole thread Raw
In response to Replace uses of deprecated Python module distutils.sysconfig  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> 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



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Next
From: Tom Lane
Date:
Subject: Re: pgcrypto: Remove explicit hex encoding/decoding from tests