From 4eab239945ebb28a71e36eb136eae3ec3147d308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 14 May 2025 09:11:33 +0200 Subject: [PATCH] dev-python/pytest: Backport a test regression fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../pytest/files/pytest-8.3.5-test.patch | 24 +++++++++++++++++++ dev-python/pytest/pytest-8.3.5.ebuild | 5 ++++ 2 files changed, 29 insertions(+) create mode 100644 dev-python/pytest/files/pytest-8.3.5-test.patch diff --git a/dev-python/pytest/files/pytest-8.3.5-test.patch b/dev-python/pytest/files/pytest-8.3.5-test.patch new file mode 100644 index 0000000000000..9a900c69244ad --- /dev/null +++ b/dev-python/pytest/files/pytest-8.3.5-test.patch @@ -0,0 +1,24 @@ +From b7854561993d00b8dddf3f43ce6b042b4111fa4c Mon Sep 17 00:00:00 2001 +From: jakkdl +Date: Wed, 12 Mar 2025 15:10:29 +0100 +Subject: [PATCH] fix attrs==25.2.0 compatibility + +--- + changelog/13291.bugfix.rst | 1 + + src/_pytest/assertion/util.py | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + create mode 100644 changelog/13291.bugfix.rst + +diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py +index 30aee185d57..c545e6cd20c 100644 +--- a/src/_pytest/assertion/util.py ++++ b/src/_pytest/assertion/util.py +@@ -169,7 +169,7 @@ def has_default_eq( + code_filename = obj.__eq__.__code__.co_filename + + if isattrs(obj): +- return "attrs generated eq" in code_filename ++ return "attrs generated " in code_filename + + return code_filename == "" # data class + return True diff --git a/dev-python/pytest/pytest-8.3.5.ebuild b/dev-python/pytest/pytest-8.3.5.ebuild index 03ea1620cdc2b..b3d5b5f0a07b1 100644 --- a/dev-python/pytest/pytest-8.3.5.ebuild +++ b/dev-python/pytest/pytest-8.3.5.ebuild @@ -45,6 +45,11 @@ BDEPEND=" ) " +PATCHES=( + # https://github.com/pytest-dev/pytest/pull/13291 + "${FILESDIR}/${P}-test.patch" +) + src_test() { # workaround new readline defaults echo "set enable-bracketed-paste off" > "${T}"/inputrc || die