Re: pgsql: Enable Python Limited API for PL/Python on MSVC

From: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: pgsql: Enable Python Limited API for PL/Python on MSVC
Date: 2026-01-15 16:21:50
Message-ID: 0de98c41-4145-44c1-aac5-087cf5b3e4a9@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 1/15/2026 3:36 AM, Peter Eisentraut wrote:
> This is failing on buildfarm member drongo: <https://
> buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=drongo&br=master>.
>  AFAICT, this is the only buildfarm member that tests Python on Windows,
> so we have no additional results to compare with.  It did pass on Cirrus
> CI.  Andrew/Bryan, could you figure out how the Python installation on
> drongo is different?
>

Peter, Andrew,

The failure on drongo is due to my writing this patch to support meson
versions >= 1.1.0. I setup my local environment to match CI and was
using meson 1.10.0. Before 1.1.0 you needed to pass the include
directory to check_headers with arg:. I have made the changes and
tested python 3.11 w/meson 0.57.2 and 1.0.1. I have also retested with
python 3.14 and meson 1.10.0. Everything passed.

Additional items to note:

1. meson 1.0.1 expects distutils which was retired in python 3.12. If
you want to use a later python with that version of meson (or earlier)
you will need to install setuptools which has a distutils shim I am led
to believe.
2. when building with meson 0.57.2 I had to provide -Dreadline=disabled
for the build to succeed.

The v2 patch is attached.

--
Bryan Green
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
v2-0001-Enable-Python-Limited-API-for-PL-Python-on-MSVC.patch text/plain 3.0 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2026-01-15 18:20:45 pgsql: Remove #include <math.h> where not needed
Previous Message Andres Freund 2026-01-15 16:10:37 pgsql: aio: io_uring: Fix danger of completion getting reused before be