From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6768615802E for ; Mon, 1 Jul 2024 13:15:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 110A52BC067; Mon, 1 Jul 2024 13:15:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED2F52BC067 for ; Mon, 1 Jul 2024 13:14:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BEBED335D6E for ; Mon, 1 Jul 2024 13:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D38DD15F7 for ; Mon, 1 Jul 2024 13:14:56 +0000 (UTC) From: "Petr Vaněk" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petr Vaněk" Message-ID: <1719839640.3efda587bb8a8816f04ce2f9a056d57bb94f960e.arkamar@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/testtools/, dev-python/testtools/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch dev-python/testtools/testtools-2.7.2.ebuild X-VCS-Directories: dev-python/testtools/ dev-python/testtools/files/ X-VCS-Committer: arkamar X-VCS-Committer-Name: Petr Vaněk X-VCS-Revision: 3efda587bb8a8816f04ce2f9a056d57bb94f960e X-VCS-Branch: master Date: Mon, 1 Jul 2024 13:14:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63b36439-e7ef-4503-ae1d-340237d1264e X-Archives-Hash: 2ab790eae52e2bb72907236ce1b495f9 commit: 3efda587bb8a8816f04ce2f9a056d57bb94f960e Author: Petr Vaněk gentoo org> AuthorDate: Mon Jul 1 12:41:02 2024 +0000 Commit: Petr Vaněk gentoo org> CommitDate: Mon Jul 1 13:14:00 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3efda587 dev-python/testtools: extend twisted test dep to py3.13 Some tests need to be addapted for dev-python/twisted-24.3.0_p20240628 snapshot we have in our tree. The patch is backported from upstream. Signed-off-by: Petr Vaněk gentoo.org> .../files/testtools-2.7.2-twisted-fix.patch | 45 ++++++++++++++++++++++ dev-python/testtools/testtools-2.7.2.ebuild | 8 ++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch b/dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch new file mode 100644 index 000000000000..bbf943be60d1 --- /dev/null +++ b/dev-python/testtools/files/testtools-2.7.2-twisted-fix.patch @@ -0,0 +1,45 @@ +From 5b8cb6497c7159f593e68de6a13e15f7e78e56e3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Van=C4=9Bk?= +Date: Mon, 1 Jul 2024 10:00:05 +0200 +Subject: [PATCH] Prepare tests for upcoming twisted version + +Twisted recently changed behavior of logger on failures [1]. It newly +logs the `Main loop terminated.` even on exceptions, which breaks two +test in twistedsupport test suite. This hack attempts to address the +upcoming issue. + +[1] https://github.com/twisted/twisted/pull/12207 + +Upstream-PR: https://github.com/testing-cabal/testtools/pull/387 + +diff --git a/testtools/tests/twistedsupport/test_runtest.py b/testtools/tests/twistedsupport/test_runtest.py +index 4b46cc64..f8faf7c6 100644 +--- a/testtools/tests/twistedsupport/test_runtest.py ++++ b/testtools/tests/twistedsupport/test_runtest.py +@@ -16,7 +16,6 @@ + Contains, + ContainsAll, + ContainsDict, +- EndsWith, + Equals, + Is, + KeysEqual, +@@ -749,7 +748,7 @@ def test_something(self): + test, + { + "traceback": Not(Is(None)), +- "twisted-log": AsText(EndsWith(" foo\n")), ++ "twisted-log": AsText(Contains(" foo\n")), + }, + ), + ("stopTest", test), +@@ -790,7 +789,8 @@ def test_something(self): + result = self.make_result() + runner.run(result) + self.assertThat( +- messages, MatchesListwise([ContainsDict({"message": Equals(("foo",))})]) ++ messages[0:1], ++ MatchesListwise([ContainsDict({"message": Equals(("foo",))})]), + ) + + def test_restore_observers(self): diff --git a/dev-python/testtools/testtools-2.7.2.ebuild b/dev-python/testtools/testtools-2.7.2.ebuild index f9c9a6886024..d26da3f05732 100644 --- a/dev-python/testtools/testtools-2.7.2.ebuild +++ b/dev-python/testtools/testtools-2.7.2.ebuild @@ -27,12 +27,14 @@ BDEPEND=" >=dev-python/fixtures-2.0.0[${PYTHON_USEDEP}] dev-python/testscenarios[${PYTHON_USEDEP}] dev-python/testresources[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - dev-python/twisted[${PYTHON_USEDEP}] - ' 3.{10..12}) + dev-python/twisted[${PYTHON_USEDEP}] ) " +PATCHES=( + "${FILESDIR}/${PN}-2.7.2-twisted-fix.patch" +) + distutils_enable_sphinx doc python_test() {