Re: PG20 Minimum Dependency Thread
Tristan Partin <tristan@partin.io>
From: "Tristan Partin" <tristan@partin.io>
To: "Tom Lane" <tgl@sss.pgh.pa.us>, "Jacob Champion"
<jacob.champion@enterprisedb.com>
Cc: "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-19T04:49:18Z
Lists: pgsql-hackers
On Thu Jun 18, 2026 at 6:35 PM CDT, Tom Lane wrote: > I wrote: >> Now maybe we can finesse that, like "you can build PL/Python and >> associated contrib modules with Python >= X, but if you want to >> run these optional tests, they require Python >= Y". Not sure >> how comfortable I am with that. I definitely don't want to get >> into a situation where we require buildfarm owners to have >> Python >= Y installed, because then we will not have any testing >> that proves we didn't break the other part. (So we'd need a >> runtime check to skip these tests on too-old Python.) > > Granting that our pytest framework should silently give up if > Python is too old, the decision of which minimum version to target > is really kind of independent of what PL/Python does. It becomes > a tradeoff of ease of coding versus "how many platforms do you want > this test to be able to run on?". I have no insight on what the > coding benefits are of different Python versions, but I do have > this freshly-scraped data about how many buildfarm members are > reporting which major Python version: > > 3 3.5 > 39 3.6 > 5 3.7 > 5 3.8 > 39 3.9 > 6 3.10 > 21 3.11 > 45 3.12 > 48 3.13 > 12 3.14 > 2 3.15 > > Just eyeing that, it seems like 3.9 or 3.11 would be choices that > still allow most animals to run the tests. The latest versions of pytest require Python >= 3.10. In theory, we could pin to an older pytest version. For what it's worth, the latest version of Meson supports Python >= 3.7. I wonder if we should tie our Meson and pytest versions together such that they support the same Python version. -- Tristan Partin PostgreSQL Contributors Team AWS (https://aws.amazon.com)