Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXjCI-00DHNr-P4 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 15:51:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tXjCF-001ehh-Fv for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 15:51:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXjCE-001ehY-Ll for pgsql-hackers@lists.postgresql.org; Tue, 14 Jan 2025 15:51:15 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tXjCA-000NeB-0w for pgsql-hackers@postgresql.org; Tue, 14 Jan 2025 15:51:14 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id B09CE114021D; Tue, 14 Jan 2025 10:51:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Tue, 14 Jan 2025 10:51:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eggerapps.at; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1736869868; x=1736956268; bh=lUTEgltW8L BG4TyGaMJEkJjdBHL7oRgRU99hsLf7+zg=; b=c1e4frCQV96cm6rC9WzrOoAOj4 yHcvk8t4Hxx8bzpM2zoNhmFx3+y2fGzajJH81jUJ3ZpruspTnPS9R27Jo029Ybet eWkaHjSei12FIrsXDPEE9MEPsWTmP/c2owgihc1Dk0qkJgWkxFPJsAXksMN0L5eP z004Xe8Myj5chSsll6F1QDCiIKIQeKmzAlp2fnIN6kLyedGblvfnVbcocZYBhqGg bnb3hlD+xW1v9HbkjYdi9jBNX0LO/3bPbVSxha54xVavE1Ioa5p56kjIgwWJ794g qNMUyLS9JlduXJNPowvOQ12v4+3VG/zx6AGznXVDrfjCe710OXOJjzy3xvOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1736869868; x=1736956268; bh=lUTEgltW8LBG4TyGaMJEkJjdBHL7oRgRU99 hsLf7+zg=; b=NWqX29xvXySb7YriAnLLMgxlU9Z7RblCVi1jDEfHe8qgnCfDT4v 4BrFDyQXaZ7iq7M632El3osXZAuZ/CDjXZzb5sLCpxtXRHSXuJgxyy7K2jPL65Ak AdHpg0uNu7e4c0qE6DeiamTaQV6Qhb5NEiTh88LyGpDEUmSD4sgX1se577WJAkXb PVF7VY33CgYkUJ0X7/6ePr2EYXXelIyCK43Uk0Yj/8IXA+6/SXLEDnnwL4DwzQVa D5FtoeI7xodEbYOicGc/XHE5LL+vhQVZnVRqqWegqBgtvYKbOWuyG7MCculN2LFv g6PX1W0b+DAOexmBpPSpdA1HAlf0ivMH4Sw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehiedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffktgggufffjgevvfhfofesrgdtmherhhdtvden ucfhrhhomheplfgrkhhosgcugfhgghgvrhcuoehjrghkohgssegvghhgvghrrghpphhsrd grtheqnecuggftrfgrthhtvghrnhepiefgvdeuvdeuteelhfekjeehveekgeffgedvvdfh teffkeffjeevgfdvgeffueeinecuffhomhgrihhnpegtihhrrhhushdqtghirdgtohhmpd hgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehjrghkohgssegvghhgvghrrghpphhsrdgrthdpnhgspghrtghpthhtoh epvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhesvghishgvnhht rhgruhhtrdhorhhgpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtgh hrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i8b2c40a9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Jan 2025 10:51:07 -0500 (EST) From: Jakob Egger Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_2F39F365-064E-4F0B-BFAE-477EAF7B948B" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: Use Python "Limited API" in PL/Python Date: Tue, 14 Jan 2025 16:51:05 +0100 In-Reply-To: Cc: pgsql-hackers To: Peter Eisentraut References: X-Mailer: Apple Mail (2.3826.300.87.4.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_2F39F365-064E-4F0B-BFAE-477EAF7B948B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 07.01.2025, at 08:34, Peter Eisentraut wrote: > On 02.12.24 09:51, Peter Eisentraut wrote: >> This patch changes PL/Python to use the Python "limited API". This = API has stronger ABI stability guarantees.[0] This means, you can build = PL/ Python against any Python 3.x version and use any other Python 3.x = version at run time. >> This is especially useful for binary packages where the operating = system does not come with a fixed suitable version of Python. For = example, Postgres.app (for macOS) would prefer to link against the = Python version supplied by python.org (Python.app). But that has a 3.x = version that changes over time. So instead they bundle a Python version = inside Postgres.app. The Windows installer used to also bundle Python = but as of PG17 you have to get it yourself, but you have to get a very = specific version [1], which is unsatisfactory. This patch fixes that: = You can use any Python version independent of what PL/Python was built = against. (There is a mechanism to say "at least 3.N", but for this = patch, we don't need that, we can stick with the current minimum of = 3.2.) >> (I have only tested the macOS side of this, not the Windows side. In = fact, the patch currently doesn't build on Windows on CI. I haven't = figured out why.) >=20 > A bit more exploration of that Windows build failure: >=20 > This patch changes it so that, on Windows, plpython is linked against = a library called "python3.lib" instead of previously "python311.lib" or = similar. The build failure is [0] >=20 > LINK : fatal error LNK1104: cannot open file 'python3.lib' >=20 > [0]: https://cirrus-ci.com/task/5738515637469184 >=20 > which suggests that the file isn't there. But we have tested this = internally and the build succeeded locally. I also don't see anything = in the Python installer code or documentation that suggests that there = is an option not to install that file or something like that. It should = be installed right next to the python3XX.lib file. I think the problem is that meson doesn't know we want to use the = limited API. I found this related issue on Github: = https://github.com/mesonbuild/meson/issues/13824 Someone suggests to change the Python dependency in the meson.build file = like this: py_dep =3D declare_dependency( dependencies: py_dep, compile_args: '-DPy_LIMITED_API=3D'0x030100', ) I've tried to create a patch with this change. I'm attaching it to this = message so that cfbot picks it up. (I was unable to reproduce the issue = locally) Best regards, Jakob =EF=BF=BC=EF=BF=BC=EF=BF=BC= --Apple-Mail=_2F39F365-064E-4F0B-BFAE-477EAF7B948B Content-Type: multipart/mixed; boundary="Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2" --Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii On 07.01.2025, = at 08:34, Peter Eisentraut <peter@eisentraut.org> = wrote:
On 02.12.24 09:51, = Peter Eisentraut wrote:
This patch changes = PL/Python to use the Python "limited API". This API has stronger ABI = stability guarantees.[0] This means, you can build PL/ Python against = any Python 3.x version and use any other Python 3.x version at run = time.
This is especially useful for binary packages where the = operating system does not come with a fixed suitable version of Python. = For example, Postgres.app (for macOS) would prefer to link against the = Python version supplied by python.org (Python.app). But that has a 3.x = version that changes over time. So instead they bundle a Python version = inside Postgres.app. The Windows installer used to also bundle Python = but as of PG17 you have to get it yourself, but you have to get a very = specific version [1], which is unsatisfactory. This patch fixes that: = You can use any Python version independent of what PL/Python was built = against. (There is a mechanism to say "at least 3.N", but for this = patch, we don't need that, we can stick with the current minimum of = 3.2.)
(I have only tested the macOS side of this, not the Windows = side. In fact, the patch currently doesn't build on Windows on CI. I = haven't figured out why.)

A bit more exploration of = that Windows build failure:

This patch changes it so that, on = Windows, plpython is linked against a library called "python3.lib" = instead of previously "python311.lib" or similar.  The build = failure is [0]

   LINK : fatal error LNK1104: = cannot open file 'python3.lib'

[0]: = https://cirrus-ci.com/task/5738515637469184

which suggests that = the file isn't there.  But we have tested this internally and the = build succeeded locally.  I also don't see anything in the Python = installer code or documentation that suggests that there is an option = not to install that file or something like that.  It should be = installed right next to the python3XX.lib = file.


I = think the problem is that meson doesn't know we want to use the limited = API.
I found this related issue on Github: https://github.c= om/mesonbuild/meson/issues/13824

Someone = suggests to change the Python dependency in the meson.build file like = this:

py_dep =3D declare_dependency(
    dependencies: py_dep,
    compile_args: '-DPy_LIMITED_API=3D'0x030100',
)

I've = tried to create a patch with this change. I'm attaching it to this = message so that cfbot picks it up. (I was unable to reproduce the issue = locally)


Best = regards,
Jakob

= --Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Disposition: attachment; filename=0001-Remove-obsolete-Python-version-check.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Remove-obsolete-Python-version-check.patch" Content-Transfer-Encoding: quoted-printable =46rom=200e046101ea8ed321a09b0ed2bb0a0fc0ce0d2399=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Peter=20Eisentraut=20=0A= Date:=20Mon,=202=20Dec=202024=2008:53:42=20+0100=0ASubject:=20[PATCH=20= 1/3]=20Remove=20obsolete=20Python=20version=20check=0A=0AThe=20checked=20= version=20is=20already=20the=20current=20minimum=20supported=20version=0A= (3.2).=0A---=0A=20src/pl/plpython/plpy_exec.c=20|=208=20+-------=0A=201=20= file=20changed,=201=20insertion(+),=207=20deletions(-)=0A=0Adiff=20--git=20= a/src/pl/plpython/plpy_exec.c=20b/src/pl/plpython/plpy_exec.c=0Aindex=20= 0e84bb90829..00747bb811b=20100644=0A---=20a/src/pl/plpython/plpy_exec.c=0A= +++=20b/src/pl/plpython/plpy_exec.c=0A@@=20-1066,13=20+1066,7=20@@=20= PLy_procedure_call(PLyProcedure=20*proc,=20const=20char=20*kargs,=20= PyObject=20*vargs)=0A=20=0A=20=09PG_TRY();=0A=20=09{=0A-#if=20= PY_VERSION_HEX=20>=3D=200x03020000=0A-=09=09rv=20=3D=20= PyEval_EvalCode(proc->code,=0A-=09=09=09=09=09=09=09=20proc->globals,=20= proc->globals);=0A-#else=0A-=09=09rv=20=3D=20= PyEval_EvalCode((PyCodeObject=20*)=20proc->code,=0A-=09=09=09=09=09=09=09= =20proc->globals,=20proc->globals);=0A-#endif=0A+=09=09rv=20=3D=20= PyEval_EvalCode(proc->code,=20proc->globals,=20proc->globals);=0A=20=0A=20= =09=09/*=0A=20=09=09=20*=20Since=20plpy=20will=20only=20let=20you=20= close=20subtransactions=20that=20you=0A--=20=0A2.39.5=20(Apple=20= Git-154)=0A=0A= --Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
--Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Disposition: attachment; filename=0002-Use-Python-Limited-API-in-PL-Python.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-Use-Python-Limited-API-in-PL-Python.patch" Content-Transfer-Encoding: quoted-printable =46rom=20f2e0b87a5bae68756327b37959812674dcd02668=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Peter=20Eisentraut=20=0A= Date:=20Mon,=202=20Dec=202024=2008:53:42=20+0100=0ASubject:=20[PATCH=20= 2/3]=20Use=20Python=20"Limited=20API"=20in=20PL/Python=0A=0AThis=20= allows=20building=20PL/Python=20against=20any=20Python=203.x=20version=20= and=0Ausing=20another=20Python=203.x=20version=20at=20run=20time.=0A=0A= Implementation=20details:=0A=0A-=20Convert=20static=20types=20to=20heap=20= types=0A=20=20= (https://docs.python.org/3/howto/isolating-extensions.html#heap-types).=0A= =0A-=20Replace=20PyRun_String()=20with=20component=20functions.=0A=0A-=20= Replace=20PyList_SET_ITEM()=20with=20PyList_SetItem().=0A---=0A=20= src/pl/plpython/plpy_cursorobject.c=20=20|=2071=20+++++++++++++-------=0A= =20src/pl/plpython/plpy_planobject.c=20=20=20=20|=2061=20= +++++++++++------=0A=20src/pl/plpython/plpy_procedure.c=20=20=20=20=20|=20= =205=20+-=0A=20src/pl/plpython/plpy_resultobject.c=20=20|=2098=20= +++++++++++++++++-----------=0A=20src/pl/plpython/plpy_subxactobject.c=20= |=2041=20+++++++-----=0A=20src/pl/plpython/plpy_typeio.c=20=20=20=20=20=20= =20=20|=20=206=20+-=0A=20src/pl/plpython/plpython.h=20=20=20=20=20=20=20=20= =20=20=20|=20=202=20+=0A=207=20files=20changed,=20179=20insertions(+),=20= 105=20deletions(-)=0A=0Adiff=20--git=20= a/src/pl/plpython/plpy_cursorobject.c=20= b/src/pl/plpython/plpy_cursorobject.c=0Aindex=20bb3fa8a3909..2a370157f90=20= 100644=0A---=20a/src/pl/plpython/plpy_cursorobject.c=0A+++=20= b/src/pl/plpython/plpy_cursorobject.c=0A@@=20-20,7=20+20,7=20@@=0A=20= #include=20"utils/memutils.h"=0A=20=0A=20static=20PyObject=20= *PLy_cursor_query(const=20char=20*query);=0A-static=20void=20= PLy_cursor_dealloc(PyObject=20*arg);=0A+static=20void=20= PLy_cursor_dealloc(PLyCursorObject=20*self);=0A=20static=20PyObject=20= *PLy_cursor_iternext(PyObject=20*self);=0A=20static=20PyObject=20= *PLy_cursor_fetch(PyObject=20*self,=20PyObject=20*args);=0A=20static=20= PyObject=20*PLy_cursor_close(PyObject=20*self,=20PyObject=20*unused);=0A= @@=20-33,22=20+33,43=20@@=20static=20PyMethodDef=20PLy_cursor_methods[]=20= =3D=20{=0A=20=09{NULL,=20NULL,=200,=20NULL}=0A=20};=0A=20=0A-static=20= PyTypeObject=20PLy_CursorType=20=3D=20{=0A-=09= PyVarObject_HEAD_INIT(NULL,=200)=0A-=09.tp_name=20=3D=20"PLyCursor",=0A-=09= .tp_basicsize=20=3D=20sizeof(PLyCursorObject),=0A-=09.tp_dealloc=20=3D=20= PLy_cursor_dealloc,=0A-=09.tp_flags=20=3D=20Py_TPFLAGS_DEFAULT=20|=20= Py_TPFLAGS_BASETYPE,=0A-=09.tp_doc=20=3D=20PLy_cursor_doc,=0A-=09= .tp_iter=20=3D=20PyObject_SelfIter,=0A-=09.tp_iternext=20=3D=20= PLy_cursor_iternext,=0A-=09.tp_methods=20=3D=20PLy_cursor_methods,=0A= +static=20PyType_Slot=20PLyCursor_slots[]=20=3D=0A+{=0A+=09{=0A+=09=09= Py_tp_dealloc,=20PLy_cursor_dealloc=0A+=09},=0A+=09{=0A+=09=09Py_tp_doc,=20= (char=20*)=20PLy_cursor_doc=0A+=09},=0A+=09{=0A+=09=09Py_tp_iter,=20= PyObject_SelfIter=0A+=09},=0A+=09{=0A+=09=09Py_tp_iternext,=20= PLy_cursor_iternext=0A+=09},=0A+=09{=0A+=09=09Py_tp_methods,=20= PLy_cursor_methods=0A+=09},=0A+=09{=0A+=09=090,=20NULL=0A+=09}=0A=20};=0A= =20=0A+static=20PyType_Spec=20PLyCursor_spec=20=3D=0A+{=0A+=09.name=20=3D=20= "PLyCursor",=0A+=09=09.basicsize=20=3D=20sizeof(PLyCursorObject),=0A+=09=09= .flags=20=3D=20Py_TPFLAGS_DEFAULT=20|=20Py_TPFLAGS_BASETYPE,=0A+=09=09= .slots=20=3D=20PLyCursor_slots,=0A+};=0A+=0A+static=20PyTypeObject=20= *PLy_CursorType;=0A+=0A=20void=0A=20PLy_cursor_init_type(void)=0A=20{=0A= -=09if=20(PyType_Ready(&PLy_CursorType)=20<=200)=0A+=09PLy_CursorType=20= =3D=20(PyTypeObject=20*)=20PyType_FromSpec(&PLyCursor_spec);=0A+=09if=20= (!PLy_CursorType)=0A=20=09=09elog(ERROR,=20"could=20not=20initialize=20= PLy_CursorType");=0A=20}=0A=20=0A@@=20-80,7=20+101,7=20@@=20= PLy_cursor_query(const=20char=20*query)=0A=20=09volatile=20MemoryContext=20= oldcontext;=0A=20=09volatile=20ResourceOwner=20oldowner;=0A=20=0A-=09if=20= ((cursor=20=3D=20PyObject_New(PLyCursorObject,=20&PLy_CursorType))=20=3D=3D= =20NULL)=0A+=09if=20((cursor=20=3D=20PyObject_New(PLyCursorObject,=20= PLy_CursorType))=20=3D=3D=20NULL)=0A=20=09=09return=20NULL;=0A=20=09= cursor->portalname=20=3D=20NULL;=0A=20=09cursor->closed=20=3D=20false;=0A= @@=20-177,7=20+198,7=20@@=20PLy_cursor_plan(PyObject=20*ob,=20PyObject=20= *args)=0A=20=09=09return=20NULL;=0A=20=09}=0A=20=0A-=09if=20((cursor=20=3D= =20PyObject_New(PLyCursorObject,=20&PLy_CursorType))=20=3D=3D=20NULL)=0A= +=09if=20((cursor=20=3D=20PyObject_New(PLyCursorObject,=20= PLy_CursorType))=20=3D=3D=20NULL)=0A=20=09=09return=20NULL;=0A=20=09= cursor->portalname=20=3D=20NULL;=0A=20=09cursor->closed=20=3D=20false;=0A= @@=20-272,30=20+293,30=20@@=20PLy_cursor_plan(PyObject=20*ob,=20PyObject=20= *args)=0A=20}=0A=20=0A=20static=20void=0A-PLy_cursor_dealloc(PyObject=20= *arg)=0A+PLy_cursor_dealloc(PLyCursorObject=20*self)=0A=20{=0A-=09= PLyCursorObject=20*cursor;=0A+=09PyTypeObject=20*tp=20=3D=20= Py_TYPE(self);=0A=20=09Portal=09=09portal;=0A=20=0A-=09cursor=20=3D=20= (PLyCursorObject=20*)=20arg;=0A-=0A-=09if=20(!cursor->closed)=0A+=09if=20= (!self->closed)=0A=20=09{=0A-=09=09portal=20=3D=20= GetPortalByName(cursor->portalname);=0A+=09=09portal=20=3D=20= GetPortalByName(self->portalname);=0A=20=0A=20=09=09if=20= (PortalIsValid(portal))=0A=20=09=09{=0A=20=09=09=09UnpinPortal(portal);=0A= =20=09=09=09SPI_cursor_close(portal);=0A=20=09=09}=0A-=09=09= cursor->closed=20=3D=20true;=0A+=09=09self->closed=20=3D=20true;=0A=20=09= }=0A-=09if=20(cursor->mcxt)=0A+=09if=20(self->mcxt)=0A=20=09{=0A-=09=09= MemoryContextDelete(cursor->mcxt);=0A-=09=09cursor->mcxt=20=3D=20NULL;=0A= +=09=09MemoryContextDelete(self->mcxt);=0A+=09=09self->mcxt=20=3D=20= NULL;=0A=20=09}=0A-=09arg->ob_type->tp_free(arg);=0A+=0A+=09= PyObject_Free(self);=0A+=09Py_DECREF(tp);=0A=20}=0A=20=0A=20static=20= PyObject=20*=0Adiff=20--git=20a/src/pl/plpython/plpy_planobject.c=20= b/src/pl/plpython/plpy_planobject.c=0Aindex=209427674d2f4..1b97b5cbd2a=20= 100644=0A---=20a/src/pl/plpython/plpy_planobject.c=0A+++=20= b/src/pl/plpython/plpy_planobject.c=0A@@=20-12,7=20+12,7=20@@=0A=20= #include=20"plpython.h"=0A=20#include=20"utils/memutils.h"=0A=20=0A= -static=20void=20PLy_plan_dealloc(PyObject=20*arg);=0A+static=20void=20= PLy_plan_dealloc(PLyPlanObject=20*self);=0A=20static=20PyObject=20= *PLy_plan_cursor(PyObject=20*self,=20PyObject=20*args);=0A=20static=20= PyObject=20*PLy_plan_execute(PyObject=20*self,=20PyObject=20*args);=0A=20= static=20PyObject=20*PLy_plan_status(PyObject=20*self,=20PyObject=20= *args);=0A@@=20-26,20=20+26,37=20@@=20static=20PyMethodDef=20= PLy_plan_methods[]=20=3D=20{=0A=20=09{NULL,=20NULL,=200,=20NULL}=0A=20};=0A= =20=0A-static=20PyTypeObject=20PLy_PlanType=20=3D=20{=0A-=09= PyVarObject_HEAD_INIT(NULL,=200)=0A-=09.tp_name=20=3D=20"PLyPlan",=0A-=09= .tp_basicsize=20=3D=20sizeof(PLyPlanObject),=0A-=09.tp_dealloc=20=3D=20= PLy_plan_dealloc,=0A-=09.tp_flags=20=3D=20Py_TPFLAGS_DEFAULT=20|=20= Py_TPFLAGS_BASETYPE,=0A-=09.tp_doc=20=3D=20PLy_plan_doc,=0A-=09= .tp_methods=20=3D=20PLy_plan_methods,=0A+static=20PyType_Slot=20= PLyPlan_slots[]=20=3D=0A+{=0A+=09{=0A+=09=09Py_tp_dealloc,=20= PLy_plan_dealloc=0A+=09},=0A+=09{=0A+=09=09Py_tp_doc,=20(char=20*)=20= PLy_plan_doc=0A+=09},=0A+=09{=0A+=09=09Py_tp_methods,=20PLy_plan_methods=0A= +=09},=0A+=09{=0A+=09=090,=20NULL=0A+=09}=0A=20};=0A=20=0A+static=20= PyType_Spec=20PLyPlan_spec=20=3D=0A+{=0A+=09.name=20=3D=20"PLyPlan",=0A+=09= =09.basicsize=20=3D=20sizeof(PLyPlanObject),=0A+=09=09.flags=20=3D=20= Py_TPFLAGS_DEFAULT=20|=20Py_TPFLAGS_BASETYPE,=0A+=09=09.slots=20=3D=20= PLyPlan_slots,=0A+};=0A+=0A+static=20PyTypeObject=20*PLy_PlanType;=0A+=0A= =20void=0A=20PLy_plan_init_type(void)=0A=20{=0A-=09if=20= (PyType_Ready(&PLy_PlanType)=20<=200)=0A+=09PLy_PlanType=20=3D=20= (PyTypeObject=20*)=20PyType_FromSpec(&PLyPlan_spec);=0A+=09if=20= (!PLy_PlanType)=0A=20=09=09elog(ERROR,=20"could=20not=20initialize=20= PLy_PlanType");=0A=20}=0A=20=0A@@=20-48,7=20+65,7=20@@=20= PLy_plan_new(void)=0A=20{=0A=20=09PLyPlanObject=20*ob;=0A=20=0A-=09if=20= ((ob=20=3D=20PyObject_New(PLyPlanObject,=20&PLy_PlanType))=20=3D=3D=20= NULL)=0A+=09if=20((ob=20=3D=20PyObject_New(PLyPlanObject,=20= PLy_PlanType))=20=3D=3D=20NULL)=0A=20=09=09return=20NULL;=0A=20=0A=20=09= ob->plan=20=3D=20NULL;=0A@@=20-63,25=20+80,27=20@@=20PLy_plan_new(void)=0A= =20bool=0A=20is_PLyPlanObject(PyObject=20*ob)=0A=20{=0A-=09return=20= ob->ob_type=20=3D=3D=20&PLy_PlanType;=0A+=09return=20ob->ob_type=20=3D=3D=20= PLy_PlanType;=0A=20}=0A=20=0A=20static=20void=0A= -PLy_plan_dealloc(PyObject=20*arg)=0A+PLy_plan_dealloc(PLyPlanObject=20= *self)=0A=20{=0A-=09PLyPlanObject=20*ob=20=3D=20(PLyPlanObject=20*)=20= arg;=0A+=09PyTypeObject=20*tp=20=3D=20Py_TYPE(self);=0A=20=0A-=09if=20= (ob->plan)=0A+=09if=20(self->plan)=0A=20=09{=0A-=09=09= SPI_freeplan(ob->plan);=0A-=09=09ob->plan=20=3D=20NULL;=0A+=09=09= SPI_freeplan(self->plan);=0A+=09=09self->plan=20=3D=20NULL;=0A=20=09}=0A= -=09if=20(ob->mcxt)=0A+=09if=20(self->mcxt)=0A=20=09{=0A-=09=09= MemoryContextDelete(ob->mcxt);=0A-=09=09ob->mcxt=20=3D=20NULL;=0A+=09=09= MemoryContextDelete(self->mcxt);=0A+=09=09self->mcxt=20=3D=20NULL;=0A=20=09= }=0A-=09arg->ob_type->tp_free(arg);=0A+=0A+=09PyObject_Free(self);=0A+=09= Py_DECREF(tp);=0A=20}=0A=20=0A=20=0Adiff=20--git=20= a/src/pl/plpython/plpy_procedure.c=20b/src/pl/plpython/plpy_procedure.c=0A= index=20c35a3b801ab..b494eeb474f=20100644=0A---=20= a/src/pl/plpython/plpy_procedure.c=0A+++=20= b/src/pl/plpython/plpy_procedure.c=0A@@=20-350,6=20+350,7=20@@=20= PLy_procedure_compile(PLyProcedure=20*proc,=20const=20char=20*src)=0A=20= {=0A=20=09PyObject=20=20=20*crv=20=3D=20NULL;=0A=20=09char=09=20=20=20= *msrc;=0A+=09PyObject=20=20=20*code0;=0A=20=0A=20=09proc->globals=20=3D=20= PyDict_Copy(PLy_interp_globals);=0A=20=0A@@=20-368,7=20+369,9=20@@=20= PLy_procedure_compile(PLyProcedure=20*proc,=20const=20char=20*src)=0A=20=09= msrc=20=3D=20PLy_procedure_munge_source(proc->pyname,=20src);=0A=20=09/*=20= Save=20the=20mangled=20source=20for=20later=20inclusion=20in=20= tracebacks=20*/=0A=20=09proc->src=20=3D=20= MemoryContextStrdup(proc->mcxt,=20msrc);=0A-=09crv=20=3D=20= PyRun_String(msrc,=20Py_file_input,=20proc->globals,=20NULL);=0A+=09= code0=20=3D=20Py_CompileString(msrc,=20"",=20Py_file_input);=0A+=09= if=20(code0)=0A+=09=09crv=20=3D=20PyEval_EvalCode(code0,=20= proc->globals,=20NULL);=0A=20=09pfree(msrc);=0A=20=0A=20=09if=20(crv=20= !=3D=20NULL)=0Adiff=20--git=20a/src/pl/plpython/plpy_resultobject.c=20= b/src/pl/plpython/plpy_resultobject.c=0Aindex=2095acce65493..f2628205669=20= 100644=0A---=20a/src/pl/plpython/plpy_resultobject.c=0A+++=20= b/src/pl/plpython/plpy_resultobject.c=0A@@=20-10,7=20+10,7=20@@=0A=20= #include=20"plpy_resultobject.h"=0A=20#include=20"plpython.h"=0A=20=0A= -static=20void=20PLy_result_dealloc(PyObject=20*arg);=0A+static=20void=20= PLy_result_dealloc(PLyResultObject=20*self);=0A=20static=20PyObject=20= *PLy_result_colnames(PyObject=20*self,=20PyObject=20*unused);=0A=20= static=20PyObject=20*PLy_result_coltypes(PyObject=20*self,=20PyObject=20= *unused);=0A=20static=20PyObject=20*PLy_result_coltypmods(PyObject=20= *self,=20PyObject=20*unused);=0A@@=20-24,17=20+24,6=20@@=20static=20int=09= PLy_result_ass_subscript(PyObject=20*arg,=20PyObject=20*item,=20PyObject=20= *val=0A=20=0A=20static=20char=20PLy_result_doc[]=20=3D=20"Results=20of=20= a=20PostgreSQL=20query";=0A=20=0A-static=20PySequenceMethods=20= PLy_result_as_sequence=20=3D=20{=0A-=09.sq_length=20=3D=20= PLy_result_length,=0A-=09.sq_item=20=3D=20PLy_result_item,=0A-};=0A-=0A= -static=20PyMappingMethods=20PLy_result_as_mapping=20=3D=20{=0A-=09= .mp_length=20=3D=20PLy_result_length,=0A-=09.mp_subscript=20=3D=20= PLy_result_subscript,=0A-=09.mp_ass_subscript=20=3D=20= PLy_result_ass_subscript,=0A-};=0A-=0A=20static=20PyMethodDef=20= PLy_result_methods[]=20=3D=20{=0A=20=09{"colnames",=20= PLy_result_colnames,=20METH_NOARGS,=20NULL},=0A=20=09{"coltypes",=20= PLy_result_coltypes,=20METH_NOARGS,=20NULL},=0A@@=20-44,23=20+33,55=20@@=20= static=20PyMethodDef=20PLy_result_methods[]=20=3D=20{=0A=20=09{NULL,=20= NULL,=200,=20NULL}=0A=20};=0A=20=0A-static=20PyTypeObject=20= PLy_ResultType=20=3D=20{=0A-=09PyVarObject_HEAD_INIT(NULL,=200)=0A-=09= .tp_name=20=3D=20"PLyResult",=0A-=09.tp_basicsize=20=3D=20= sizeof(PLyResultObject),=0A-=09.tp_dealloc=20=3D=20PLy_result_dealloc,=0A= -=09.tp_as_sequence=20=3D=20&PLy_result_as_sequence,=0A-=09= .tp_as_mapping=20=3D=20&PLy_result_as_mapping,=0A-=09.tp_str=20=3D=20= &PLy_result_str,=0A-=09.tp_flags=20=3D=20Py_TPFLAGS_DEFAULT=20|=20= Py_TPFLAGS_BASETYPE,=0A-=09.tp_doc=20=3D=20PLy_result_doc,=0A-=09= .tp_methods=20=3D=20PLy_result_methods,=0A+static=20PyType_Slot=20= PLyResult_slots[]=20=3D=0A+{=0A+=09{=0A+=09=09Py_tp_dealloc,=20= PLy_result_dealloc=0A+=09},=0A+=09{=0A+=09=09Py_sq_length,=20= PLy_result_length=0A+=09},=0A+=09{=0A+=09=09Py_sq_item,=20= PLy_result_item=0A+=09},=0A+=09{=0A+=09=09Py_mp_length,=20= PLy_result_length=0A+=09},=0A+=09{=0A+=09=09Py_mp_subscript,=20= PLy_result_subscript=0A+=09},=0A+=09{=0A+=09=09Py_mp_ass_subscript,=20= PLy_result_ass_subscript=0A+=09},=0A+=09{=0A+=09=09Py_tp_str,=20= PLy_result_str=0A+=09},=0A+=09{=0A+=09=09Py_tp_doc,=20(char=20*)=20= PLy_result_doc=0A+=09},=0A+=09{=0A+=09=09Py_tp_methods,=20= PLy_result_methods=0A+=09},=0A+=09{=0A+=09=090,=20NULL=0A+=09}=0A=20};=0A= =20=0A+static=20PyType_Spec=20PLyResult_spec=20=3D=0A+{=0A+=09.name=20=3D=20= "PLyResult",=0A+=09=09.basicsize=20=3D=20sizeof(PLyResultObject),=0A+=09=09= .flags=20=3D=20Py_TPFLAGS_DEFAULT=20|=20Py_TPFLAGS_BASETYPE,=0A+=09=09= .slots=20=3D=20PLyResult_slots,=0A+};=0A+=0A+static=20PyTypeObject=20= *PLy_ResultType;=0A+=0A=20void=0A=20PLy_result_init_type(void)=0A=20{=0A= -=09if=20(PyType_Ready(&PLy_ResultType)=20<=200)=0A+=09PLy_ResultType=20= =3D=20(PyTypeObject=20*)=20PyType_FromSpec(&PLyResult_spec);=0A+=09if=20= (!PLy_ResultType)=0A=20=09=09elog(ERROR,=20"could=20not=20initialize=20= PLy_ResultType");=0A=20}=0A=20=0A@@=20-69,7=20+90,7=20@@=20= PLy_result_new(void)=0A=20{=0A=20=09PLyResultObject=20*ob;=0A=20=0A-=09= if=20((ob=20=3D=20PyObject_New(PLyResultObject,=20&PLy_ResultType))=20=3D=3D= =20NULL)=0A+=09if=20((ob=20=3D=20PyObject_New(PLyResultObject,=20= PLy_ResultType))=20=3D=3D=20NULL)=0A=20=09=09return=20NULL;=0A=20=0A=20=09= /*=20ob->tuples=20=3D=20NULL;=20*/=0A@@=20-89,20=20+110,21=20@@=20= PLy_result_new(void)=0A=20}=0A=20=0A=20static=20void=0A= -PLy_result_dealloc(PyObject=20*arg)=0A= +PLy_result_dealloc(PLyResultObject=20*self)=0A=20{=0A-=09= PLyResultObject=20*ob=20=3D=20(PLyResultObject=20*)=20arg;=0A+=09= PyTypeObject=20*tp=20=3D=20Py_TYPE(self);=0A=20=0A-=09= Py_XDECREF(ob->nrows);=0A-=09Py_XDECREF(ob->rows);=0A-=09= Py_XDECREF(ob->status);=0A-=09if=20(ob->tupdesc)=0A+=09= Py_XDECREF(self->nrows);=0A+=09Py_XDECREF(self->rows);=0A+=09= Py_XDECREF(self->status);=0A+=09if=20(self->tupdesc)=0A=20=09{=0A-=09=09= FreeTupleDesc(ob->tupdesc);=0A-=09=09ob->tupdesc=20=3D=20NULL;=0A+=09=09= FreeTupleDesc(self->tupdesc);=0A+=09=09self->tupdesc=20=3D=20NULL;=0A=20=09= }=0A=20=0A-=09arg->ob_type->tp_free(arg);=0A+=09PyObject_Free(self);=0A+=09= Py_DECREF(tp);=0A=20}=0A=20=0A=20static=20PyObject=20*=0A@@=20-125,7=20= +147,7=20@@=20PLy_result_colnames(PyObject=20*self,=20PyObject=20= *unused)=0A=20=09{=0A=20=09=09Form_pg_attribute=20attr=20=3D=20= TupleDescAttr(ob->tupdesc,=20i);=0A=20=0A-=09=09PyList_SET_ITEM(list,=20= i,=20PLyUnicode_FromString(NameStr(attr->attname)));=0A+=09=09= PyList_SetItem(list,=20i,=20= PLyUnicode_FromString(NameStr(attr->attname)));=0A=20=09}=0A=20=0A=20=09= return=20list;=0A@@=20-151,7=20+173,7=20@@=20= PLy_result_coltypes(PyObject=20*self,=20PyObject=20*unused)=0A=20=09{=0A=20= =09=09Form_pg_attribute=20attr=20=3D=20TupleDescAttr(ob->tupdesc,=20i);=0A= =20=0A-=09=09PyList_SET_ITEM(list,=20i,=20= PyLong_FromLong(attr->atttypid));=0A+=09=09PyList_SetItem(list,=20i,=20= PyLong_FromLong(attr->atttypid));=0A=20=09}=0A=20=0A=20=09return=20list;=0A= @@=20-177,7=20+199,7=20@@=20PLy_result_coltypmods(PyObject=20*self,=20= PyObject=20*unused)=0A=20=09{=0A=20=09=09Form_pg_attribute=20attr=20=3D=20= TupleDescAttr(ob->tupdesc,=20i);=0A=20=0A-=09=09PyList_SET_ITEM(list,=20= i,=20PyLong_FromLong(attr->atttypmod));=0A+=09=09PyList_SetItem(list,=20= i,=20PyLong_FromLong(attr->atttypmod));=0A=20=09}=0A=20=0A=20=09return=20= list;=0A@@=20-227,7=20+249,7=20@@=20PLy_result_str(PyObject=20*arg)=0A=20= =09PLyResultObject=20*ob=20=3D=20(PLyResultObject=20*)=20arg;=0A=20=0A=20= =09return=20PyUnicode_FromFormat("<%s=20status=3D%S=20nrows=3D%S=20= rows=3D%S>",=0A-=09=09=09=09=09=09=09=09Py_TYPE(ob)->tp_name,=0A+=09=09=09= =09=09=09=09=09"PLyResult",=0A=20=09=09=09=09=09=09=09=09ob->status,=0A=20= =09=09=09=09=09=09=09=09ob->nrows,=0A=20=09=09=09=09=09=09=09=09= ob->rows);=0Adiff=20--git=20a/src/pl/plpython/plpy_subxactobject.c=20= b/src/pl/plpython/plpy_subxactobject.c=0Aindex=20= 5c92a0e089a..cc7ff3f9df7=20100644=0A---=20= a/src/pl/plpython/plpy_subxactobject.c=0A+++=20= b/src/pl/plpython/plpy_subxactobject.c=0A@@=20-15,7=20+15,6=20@@=0A=20= List=09=20=20=20*explicit_subtransactions=20=3D=20NIL;=0A=20=0A=20=0A= -static=20void=20PLy_subtransaction_dealloc(PyObject=20*subxact);=0A=20= static=20PyObject=20*PLy_subtransaction_enter(PyObject=20*self,=20= PyObject=20*unused);=0A=20static=20PyObject=20= *PLy_subtransaction_exit(PyObject=20*self,=20PyObject=20*args);=0A=20=0A= @@=20-31,21=20+30,35=20@@=20static=20PyMethodDef=20= PLy_subtransaction_methods[]=20=3D=20{=0A=20=09{NULL,=20NULL,=200,=20= NULL}=0A=20};=0A=20=0A-static=20PyTypeObject=20PLy_SubtransactionType=20= =3D=20{=0A-=09PyVarObject_HEAD_INIT(NULL,=200)=0A-=09.tp_name=20=3D=20= "PLySubtransaction",=0A-=09.tp_basicsize=20=3D=20= sizeof(PLySubtransactionObject),=0A-=09.tp_dealloc=20=3D=20= PLy_subtransaction_dealloc,=0A-=09.tp_flags=20=3D=20Py_TPFLAGS_DEFAULT=20= |=20Py_TPFLAGS_BASETYPE,=0A-=09.tp_doc=20=3D=20PLy_subtransaction_doc,=0A= -=09.tp_methods=20=3D=20PLy_subtransaction_methods,=0A+static=20= PyType_Slot=20PLySubtransaction_slots[]=20=3D=0A+{=0A+=09{=0A+=09=09= Py_tp_doc,=20(char=20*)=20PLy_subtransaction_doc=0A+=09},=0A+=09{=0A+=09=09= Py_tp_methods,=20PLy_subtransaction_methods=0A+=09},=0A+=09{=0A+=09=090,=20= NULL=0A+=09}=0A+};=0A+=0A+static=20PyType_Spec=20PLySubtransaction_spec=20= =3D=0A+{=0A+=09.name=20=3D=20"PLySubtransaction",=0A+=09=09.basicsize=20= =3D=20sizeof(PLySubtransactionObject),=0A+=09=09.flags=20=3D=20= Py_TPFLAGS_DEFAULT=20|=20Py_TPFLAGS_BASETYPE,=0A+=09=09.slots=20=3D=20= PLySubtransaction_slots,=0A=20};=0A=20=0A+static=20PyTypeObject=20= *PLy_SubtransactionType;=0A+=0A=20=0A=20void=0A=20= PLy_subtransaction_init_type(void)=0A=20{=0A-=09if=20= (PyType_Ready(&PLy_SubtransactionType)=20<=200)=0A+=09= PLy_SubtransactionType=20=3D=20(PyTypeObject=20*)=20= PyType_FromSpec(&PLySubtransaction_spec);=0A+=09if=20= (!PLy_SubtransactionType)=0A=20=09=09elog(ERROR,=20"could=20not=20= initialize=20PLy_SubtransactionType");=0A=20}=0A=20=0A@@=20-55,7=20+68,7=20= @@=20PLy_subtransaction_new(PyObject=20*self,=20PyObject=20*unused)=0A=20= {=0A=20=09PLySubtransactionObject=20*ob;=0A=20=0A-=09ob=20=3D=20= PyObject_New(PLySubtransactionObject,=20&PLy_SubtransactionType);=0A+=09= ob=20=3D=20PyObject_New(PLySubtransactionObject,=20= PLy_SubtransactionType);=0A=20=0A=20=09if=20(ob=20=3D=3D=20NULL)=0A=20=09= =09return=20NULL;=0A@@=20-66,12=20+79,6=20@@=20= PLy_subtransaction_new(PyObject=20*self,=20PyObject=20*unused)=0A=20=09= return=20(PyObject=20*)=20ob;=0A=20}=0A=20=0A-/*=20Python=20requires=20a=20= dealloc=20function=20to=20be=20defined=20*/=0A-static=20void=0A= -PLy_subtransaction_dealloc(PyObject=20*subxact)=0A-{=0A-}=0A-=0A=20/*=0A= =20=20*=20subxact.__enter__()=20or=20subxact.enter()=0A=20=20*=0Adiff=20= --git=20a/src/pl/plpython/plpy_typeio.c=20= b/src/pl/plpython/plpy_typeio.c=0Aindex=20db14c5f8dae..27d9b2f1af6=20= 100644=0A---=20a/src/pl/plpython/plpy_typeio.c=0A+++=20= b/src/pl/plpython/plpy_typeio.c=0A@@=20-723,7=20+723,7=20@@=20= PLyList_FromArray_recurse(PLyDatumToOb=20*elm,=20int=20*dims,=20int=20= ndim,=20int=20dim,=0A=20=0A=20=09=09=09sublist=20=3D=20= PLyList_FromArray_recurse(elm,=20dims,=20ndim,=20dim=20+=201,=0A=20=09=09= =09=09=09=09=09=09=09=09=09=09dataptr_p,=20bitmap_p,=20bitmask_p);=0A-=09= =09=09PyList_SET_ITEM(list,=20i,=20sublist);=0A+=09=09=09= PyList_SetItem(list,=20i,=20sublist);=0A=20=09=09}=0A=20=09}=0A=20=09= else=0A@@=20-742,14=20+742,14=20@@=20= PLyList_FromArray_recurse(PLyDatumToOb=20*elm,=20int=20*dims,=20int=20= ndim,=20int=20dim,=0A=20=09=09=09if=20(bitmap=20&&=20(*bitmap=20&=20= bitmask)=20=3D=3D=200)=0A=20=09=09=09{=0A=20=09=09=09=09= Py_INCREF(Py_None);=0A-=09=09=09=09PyList_SET_ITEM(list,=20i,=20= Py_None);=0A+=09=09=09=09PyList_SetItem(list,=20i,=20Py_None);=0A=20=09=09= =09}=0A=20=09=09=09else=0A=20=09=09=09{=0A=20=09=09=09=09Datum=09=09= itemvalue;=0A=20=0A=20=09=09=09=09itemvalue=20=3D=20fetch_att(dataptr,=20= elm->typbyval,=20elm->typlen);=0A-=09=09=09=09PyList_SET_ITEM(list,=20i,=20= elm->func(elm,=20itemvalue));=0A+=09=09=09=09PyList_SetItem(list,=20i,=20= elm->func(elm,=20itemvalue));=0A=20=09=09=09=09dataptr=20=3D=20= att_addlength_pointer(dataptr,=20elm->typlen,=20dataptr);=0A=20=09=09=09=09= dataptr=20=3D=20(char=20*)=20att_align_nominal(dataptr,=20= elm->typalign);=0A=20=09=09=09}=0Adiff=20--git=20= a/src/pl/plpython/plpython.h=20b/src/pl/plpython/plpython.h=0Aindex=20= ec822577260..c933419a347=20100644=0A---=20a/src/pl/plpython/plpython.h=0A= +++=20b/src/pl/plpython/plpython.h=0A@@=20-19,6=20+19,8=20@@=0A=20#error=20= Python.h=20must=20be=20included=20via=20plpython.h=0A=20#endif=0A=20=0A= +#define=20Py_LIMITED_API=200x03020000=0A+=0A=20/*=0A=20=20*=20Pull=20in=20= Python=20headers=20via=20a=20wrapper=20header,=20to=20control=20the=20= scope=20of=0A=20=20*=20the=20system_header=20pragma=20therein.=0A--=20=0A= 2.39.5=20(Apple=20Git-154)=0A=0A= --Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
--Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Disposition: attachment; filename=0003-Attempt-to-fix-meson-build-for-PL-Python-with-limite.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-Attempt-to-fix-meson-build-for-PL-Python-with-limite.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e4d30a4b7e0ede113cf83e98e3210c3a947451eb=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Jakob=20Egger=20=0ADate:=20= Tue,=2014=20Jan=202025=2016:31:44=20+0100=0ASubject:=20[PATCH=203/3]=20= Attempt=20to=20fix=20meson=20build=20for=20PL/Python=20with=20limited=20= API=0A=0A---=0A=20meson.build=20|=204=20++++=0A=201=20file=20changed,=20= 4=20insertions(+)=0A=0Adiff=20--git=20a/meson.build=20b/meson.build=0A= index=20cfd654d2916..ff31221e4ee=20100644=0A---=20a/meson.build=0A+++=20= b/meson.build=0A@@=20-1146,6=20+1146,10=20@@=20if=20not=20= pyopt.disabled()=0A=20=20=20python3_inst=20=3D=20= pm.find_installation(python.path(),=20required:=20pyopt)=0A=20=20=20if=20= python3_inst.found()=0A=20=20=20=20=20python3_dep=20=3D=20= python3_inst.dependency(embed:=20true,=20required:=20pyopt)=0A+=20=20=20=20= python3_dep=20=3D=20declare_dependency(=0A+=20=20=20=20=20=20=20=20= dependencies:=20python3_dep,=0A+=20=20=20=20=20=20=20=20compile_args:=20= '-DPy_LIMITED_API=3D'0x03020000',=0A+=20=20=20=20)=0A=20=20=20=20=20#=20= Remove=20this=20check=20after=20we=20depend=20on=20Meson=20>=3D=201.1.0=0A= =20=20=20=20=20if=20not=20cc.check_header('Python.h',=20dependencies:=20= python3_dep,=20required:=20pyopt,=20include_directories:=20postgres_inc)=0A= =20=20=20=20=20=20=20python3_dep=20=3D=20not_found_dep=0A--=20=0A2.39.5=20= (Apple=20Git-154)=0A=0A= --Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
--Apple-Mail=_C19FCB70-7E09-4463-A51E-23E85DBDFCF2-- --Apple-Mail=_2F39F365-064E-4F0B-BFAE-477EAF7B948B--