Re: Use Python "Limited API" in PL/Python
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Bryan Green <dbryan.green@gmail.com>, Jakob Egger <jakob@eggerapps.at>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-01-05T07:53:33Z
Lists: pgsql-hackers
On 02.01.26 18:40, Bryan Green wrote:
> I have a patch that works around this by manually constructing the
> Python dependency on MSVC to use python3.lib instead of python3XX.lib,
> using cc.find_library('python3') and building the dependency with the
> appropriate include directory. It passes CI when I push. I'll see what
> cfbot thinks.
>
> Still testing, but wanted to share progress and get feedback on the
> approach.
This approach seems fine to me. I suppose one question would be whether
it would be worth using that same approach on all platforms rather than
just on windows/msvc. That way we only have one code path to maintain.
But I'm not sure how easy that would be to achieve.
Commits
-
Enable Python Limited API for PL/Python on MSVC
- 2bc60f86219b 19 (unreleased) landed
-
Activate Python "Limited API" in PL/Python
- 0793ab810038 18.0 landed
-
Prepare for Python "Limited API" in PL/Python
- 72a3d0462b9a 18.0 landed
- c47e8df815c1 18.0 landed
-
Remove obsolete Python version check
- 32c393f9f1f1 18.0 landed