Re: Direction for test frameworks: Perl TAP vs. Python/pytest

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: Direction for test frameworks: Perl TAP vs. Python/pytest
Date: 2026-06-18 22:01:14
Message-ID: 914b4136-3959-49c5-9745-8c0168bf4fdc@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-06-18 Th 5:38 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> OK, so the consensus I'm sensing is that we should add a pytest
>> framework, backpatch it into all the live branches, and initially port
>> some relatively contained set of tests and backpatch that too.
>> ...
>> This is going to make Python a hard requirement for non-psql based
>> testing. There are currently 7 buildfarm animals building master without
>> enabling python, although 4 of those are building with meson so
>> presumably python is available to them.
> Another thing to think about: it's not just "make Python a hard
> requirement". It's "make Python >= some-version a hard requirement".
> If we intend to be able to back-patch the test framework, that will
> constrain our ability to use bleeding-edge Python features in it.
> Compare discussions at [1][2].
>
> regards, tom lane
>
> [1]https://www.postgresql.org/message-id/flat/CAOYmi%2BnVsoMRFp4u0oQ66-oPT6%2BNNAfhLvk5htthY5zkUOnbfA%40mail.gmail.com
> [2]https://www.postgresql.org/message-id/flat/16098.1745079444%40sss.pgh.pa.us

Well, I can't predict the future, but as currently written my complete
python port's version requirement is 3.8, which is already past EOL, and
is available even on RHEL8, even if the default there is 3.6. In fact we
could probably lower the requirement to 3.7 without undue difficulty, by
pytest >=7.0 has that as its minimum, so below that things get difficult.

Yes we would need to encourage some buildfarm owners to upgrade. There
is definitely going to be some pain, which is why we should work on this
very early after we fork the tree.

cheers

andrew

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-06-18 22:09:48 Re: Direction for test frameworks: Perl TAP vs. Python/pytest
Previous Message Jacob Champion 2026-06-18 21:42:50 Re: PG20 Minimum Dependency Thread