From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prepare for Python "Limited API" in PL/Python
Date: Wed, 26 Feb 2025 15:31:43 +0000
Message-ID: <E1tnJNu-000CZW-0X@gemulon.postgresql.org> (raw)
Prepare for Python "Limited API" in PL/Python
Using the Python Limited API would allow building PL/Python against
any Python 3.x version and using another Python 3.x version at run
time. This commit does not activate that, but it prepares the code to
only use APIs supported by the Limited API.
Implementation details:
- Convert static types to heap types
(https://docs.python.org/3/howto/isolating-extensions.html#heap-types).
- Replace PyRun_String() with component functions.
- Replace PyList_SET_ITEM() with PyList_SetItem().
Reviewed-by: Jakob Egger <jakob@eggerapps.at>
Discussion: https://www.postgresql.org/message-id/flat/ee410de1-1e0b-4770-b125-eeefd4726a24@eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c47e8df815c1c45f4e4fc90d5817d67ab088279f
Modified Files
--------------
src/pl/plpython/plpy_cursorobject.c | 71 +++++++++++++++++---------
src/pl/plpython/plpy_planobject.c | 61 ++++++++++++++--------
src/pl/plpython/plpy_procedure.c | 5 +-
src/pl/plpython/plpy_resultobject.c | 98 ++++++++++++++++++++++--------------
src/pl/plpython/plpy_subxactobject.c | 41 ++++++++-------
src/pl/plpython/plpy_typeio.c | 6 +--
6 files changed, 177 insertions(+), 105 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Prepare for Python "Limited API" in PL/Python
In-Reply-To: <E1tnJNu-000CZW-0X@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox