Re: Replace uses of deprecated Python module distutils.sysconfig

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replace uses of deprecated Python module distutils.sysconfig
Date: 2021-12-02 18:22:13
Message-ID: 2115892.1638469333@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-12-02 18:30:45 Re: pgcrypto: Remove explicit hex encoding/decoding from tests
Previous Message David Steele 2021-12-02 17:49:52 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file