Re: [PATCH] pl: fix can not build free-thread for plpython extension like 3.14t

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 洪伊 <zouzou0208(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] pl: fix can not build free-thread for plpython extension like 3.14t
Date: 2026-01-16 05:24:36
Message-ID: 1031618.1768541076@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I tried to investigate this by installing python314-freethreading from
MacPorts on a handy Mac machine. I got this note during install:

python314-freethreading has the following notes:
Python with free threading has a different ABI and is thus
incompatible with extension modules built for the standard ABI.

and then this while trying to build PG:

/opt/local/Library/Frameworks/Python.framework/Versions/3.14t/include/python3.14t/Python.h:52:4: error: "The limited API is not currently supported in the free-threaded build"

So you're right that it's broken. But I can only read this in one
of two ways:

1. The free-threaded build is not actually meant to be production
ready at this point,
or
2. The limited API's promise of API/ABI stability is a lie.

I prefer explanation #1. But I do not think people using Postgres
are particularly interested in development branches of Python, and if
they are, they can surely adjust the Postgres source for themselves.
It would not serve our own project's goals to ship Postgres builds
that are incompatible with the standard limited API.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message 洪伊 2026-01-16 04:59:56 Re: [PATCH] pl: fix can not build free-thread for plpython extension like 3.14t