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.96) (envelope-from ) id 1vcr2u-00BWHa-09 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Jan 2026 20:19:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vcr2q-0043kx-0r for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Jan 2026 20:19:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vcr2p-0043kk-2Q for pgsql-hackers@lists.postgresql.org; Mon, 05 Jan 2026 20:19:16 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vcr2n-004Nr8-2I for pgsql-hackers@postgresql.org; Mon, 05 Jan 2026 20:19:14 +0000 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-8888a16d243so2568386d6.1 for ; Mon, 05 Jan 2026 12:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1767644352; x=1768249152; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Gql4OPFdTsgyNZ9kNq4bBmQ9Mk7qIpj4yTl8Iij82ss=; b=R6wg32kDGioD7mWGYojxkaeX3NOMpR7Okzmv4Qv5m4UWmwxqZ5nv/e+uE/RGJKk5ir k4tQmAt7zo/ihs9/8Ek2EtrIb25cI2SAAVRR7NUqFv2mEpIESmvEGpPezVQH32DQP+QN Fw+TxbT2B95+h+Dy5kFiA+5j0uybEAQDautYLtfqqpnexRL3kiAIB51mz+xIY/h05ykv RHqP+fKxpzVyptW4mTU2fpIhiBRiL7WtHW3WYjU/ZEsmmZLDd22ZOeMQSelPYJ8sO/8L 7maw1fH0wH8OgkrRHrgzwTkppm9Jt4GIvMIUp8lkElaetzbmsz8ZwnTSTGvtWaI9Pz7/ mvUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767644352; x=1768249152; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Gql4OPFdTsgyNZ9kNq4bBmQ9Mk7qIpj4yTl8Iij82ss=; b=PDVykxj7bSUYS1YwCqpEdV+4J6mjV5/iyJVBNYspkk5Glp11i/xf+6IswAOOaxWw5W dL5QcfHR9bs+HVAmD7Te2YMawFkMuz7mx9P7gjMav8m3ouDiboAXqe4gQAJDJz5wYM6e meOmp+wMkzZYy6JATHXamBEze0jS/WTedvaOm1+QQOFPaNAJoiFwQdlHnuoC9KxVY11e Aa3slnY7p0F8GKoGIR3FOiT5DyEXVFEFRoUh/DW9QdTtxTssyFg770pikuRBJ6YxY4jQ ZpyGzY6G/q3PYgWvaxRWm/D7uEMiKGXaD3jDfqDpkJ/NvJhG8ku4v4itzrv2Ns50wz3+ IElw== X-Gm-Message-State: AOJu0Yw1TIlub1ZymhE/+t1ZniqUmFrbsEWX7JDB72wnul+KFyjSa8se YaaR5tP0polOkkoCfgKIiLNq/tEzu5nian6NQ7hkmRm7IcfNVmoj81BO/RtsXm0RBf6Dxfffpdy uLj5Ckt743b/0Hl7fnVrJP8DikCd0alDnSPexjgeh X-Gm-Gg: AY/fxX4ybJJ1g8uEzyQbCH/0YPwlRrtlMzxXpNQBDSnRK7X/BD2EI8bn3bmHs6JRcMS 28Y/MY4q2yb/exYm0Y9jTFIAfOZrPBfkb8tVm97TNY5KdIojj/Y3ubhTjw3s+rCUPO8AsKDx1zF YCW+lgkGb03duVJ9FfrgMoSSDQynFuLb28pOwpvGakZ0V5BD8blOaLXcMSU9tGactHo040VgNgV mQvL1g1ok7afmJ/JCGd95WAzuHRedb2sgNEgYV2QiADkdq9eevyBQNWAMaEzTEur68elyRqAA== X-Google-Smtp-Source: AGHT+IEqcsizg9MSxhAH77uexO/okATFZ5IwaXet1bJLyAz1Xtsv439wc8X1+gp+uL1tfLgTOBhQackINhm5VKcElZ8= X-Received: by 2002:a05:6214:c28:b0:882:49f4:da25 with SMTP id 6a1803df08f44-89075e9ec8cmr10154756d6.39.1767644352221; Mon, 05 Jan 2026 12:19:12 -0800 (PST) MIME-Version: 1.0 References: <2302192.1718380169@sss.pgh.pa.us> In-Reply-To: From: Jacob Champion Date: Mon, 5 Jan 2026 12:19:00 -0800 X-Gm-Features: AQt7F2r18pPzeZ7zqrDIjvgIELvn95mbrdvcEFsCulpO9F9ID7F8dnosdU6DUhY Message-ID: Subject: Re: RFC: adding pytest as a supported test framework To: Andres Freund , Jelte Fennema-Nio Cc: PostgreSQL Hackers , Robert Haas , Daniel Gustafsson , Tom Lane , Peter Eisentraut , Nazir Bilal Yavuz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Dec 17, 2025 at 8:10=E2=80=AFAM Andres Freund = wrote: > I assume this intentionally doesn't pass CI: > https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F6045 v2 intentionally doesn't pass CI to show what the failure modes are. Jelte rightly pointed out that this masks known 32-bit failures -- I hadn't yet found a way to get 32-bit and 64-bit Python to behave well together on Debian. (Not a huge fan of how v4 is working around the problem, though; if we can't load libpq into Python then why run pytest?) Before it gets too far away from me: note that I have not yet been able to get up to speed with the combined refactoring+feature patch that Jelte added in v3, and it's now up to v7, and this patchset has been moved out of Drafts. That's fine by me, but I plan to focus on things that need to get into PG19 before I focus on this, since nothing is really blocked on it. > I agree with adding tap to the configuration summary, but I don't underst= and > the prove part, that just seems like a waste of vertical space. I don't have a strong opinion, if no one finds it useful. > Yes, that needs to be baked into the image. Chocolatey is catastrophicall= y > slow and unreliable. It's also just bad form to hit any service with such > repeated downloads. Yep. > Why do we need pytest the program at all? Running the tests one-by-one w= ith > pytest as a runner doesn't seem to make a whole lot of sense to me. Even if we find reasons to implement our own custom runner for mtest -- which I don't think we should do for the sake of architectural purity alone; it doesn't seem to be a big deal in practice -- using pytest directly ensures that the CI is using the same code paths as individual developers who choose to use pytest as the top-level runner. > > -SUBDIRS =3D perl postmaster regress isolation modules authentication r= ecovery subscription > > +SUBDIRS =3D \ > > + authentication \ > > + isolation \ > > + modules \ > > + perl \ > > + postmaster \ > > + pytest \ > > + recovery \ > > + regress \ > > + subscription > > I'm onboard with that, but we should do it separately and probably check = for > other cases where we should do it at the same time. I'm not sure what context this is referring to? What are you on board with? > I think it'd be a seriously bad idea to start with no central infrastruct= ure, > we'd be force to duplicate that all over. Right, I just want central infra to be pulled out of the new tests that need them rather than the other way around. > Eventually we'll be forced to > introduce some central infrastructure, but we'll probably not go around a= nd > carefully go through the existing tests for stuff that should now use the > common infrastructure. Ehh... I don't want to encourage "regular" refactoring of test fixtures, since that would be incredibly disruptive and cause backport difficulties, but I think it's fine to expect some careful suite-wide improvements to be made as we introduce a completely new way of testing. (And I find composed tests in Python a lot easier to refactor than Test::More scripts, since they've declared their logical dependencies.) Thanks! --Jacob