Re: Direction for test frameworks: Perl TAP vs. Python/pytest - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Direction for test frameworks: Perl TAP vs. Python/pytest
Date
Msg-id 914b4136-3959-49c5-9745-8c0168bf4fdc@dunslane.net
Whole thread
In response to Re: Direction for test frameworks: Perl TAP vs. Python/pytest  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On 2026-06-18 Th 5:38 PM, Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.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

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: PG20 Minimum Dependency Thread
Next
From: Jacob Champion
Date:
Subject: Re: Direction for test frameworks: Perl TAP vs. Python/pytest