diff mbox series

[v2,1/2] python3-unittest-automake-output: fix pytest 9.2.0 trylast deprecation

Message ID 20261029102318.10042-1-jaipaul.cheernam@est.tech
State New
Headers show
Series [v2,1/2] python3-unittest-automake-output: fix pytest 9.2.0 trylast deprecation | expand

Commit Message

Jaipaul Cheernam Oct. 29, 2026, 10:23 a.m. UTC
- Submitted upstream MR [1] and Only the plugin fix is backported.
  MR's test-suite commit is not run in OE-build.

[1] https://gitlab.com/rossburton/python-unittest-automake-output/-/merge_requests/20

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
 ...mpl-trylast-True-instead-of-mark.try.patch | 28 +++++++++++++++++++
 .../python3-unittest-automake-output_0.4.bb   |  4 ++-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/python/python3-unittest-automake-output/0001-pytest-use-hookimpl-trylast-True-instead-of-mark.try.patch
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-unittest-automake-output/0001-pytest-use-hookimpl-trylast-True-instead-of-mark.try.patch b/meta/recipes-devtools/python/python3-unittest-automake-output/0001-pytest-use-hookimpl-trylast-True-instead-of-mark.try.patch
new file mode 100644
index 0000000000..dd36dca601
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-unittest-automake-output/0001-pytest-use-hookimpl-trylast-True-instead-of-mark.try.patch
@@ -0,0 +1,28 @@ 
+From 801e5957e7050b370df60f82025efa2229f764ce Mon Sep 17 00:00:00 2001
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Thu, 29 Oct 2026 09:33:37 +0000
+Subject: [PATCH 1/2] pytest: use hookimpl(trylast=True) instead of
+ mark.trylast
+
+pytest 9.2.0 deprecates mark.trylast and now fails to load the plugin.
+Use the hookimpl decorator instead.
+
+Upstream-Status: Submitted [https://gitlab.com/rossburton/python-unittest-automake-output/-/merge_requests/20]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ src/putao/pytest.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/putao/pytest.py b/src/putao/pytest.py
+index 13156c0..1e0f194 100644
+--- a/src/putao/pytest.py
++++ b/src/putao/pytest.py
+@@ -17,7 +17,7 @@ def pytest_addoption(parser):
+     )
+ 
+ 
+-@pytest.mark.trylast
++@pytest.hookimpl(trylast=True)
+ def pytest_configure(config):
+     """Set all the options before the test run."""
+     # The help printing uses the terminalreporter,
diff --git a/meta/recipes-devtools/python/python3-unittest-automake-output_0.4.bb b/meta/recipes-devtools/python/python3-unittest-automake-output_0.4.bb
index 9b0c62f213..07ce70531d 100644
--- a/meta/recipes-devtools/python/python3-unittest-automake-output_0.4.bb
+++ b/meta/recipes-devtools/python/python3-unittest-automake-output_0.4.bb
@@ -3,7 +3,9 @@  HOMEPAGE = "https://gitlab.com/rossburton/python-unittest-automake-output"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f6f16008d9fb7349f06609329f1ab93b"
 
-SRC_URI = "git://gitlab.com/rossburton/python-unittest-automake-output;protocol=https;branch=main;tag=${PV}"
+SRC_URI = "git://gitlab.com/rossburton/python-unittest-automake-output;protocol=https;branch=main;tag=${PV} \
+           file://0001-pytest-use-hookimpl-trylast-True-instead-of-mark.try.patch \
+           "
 
 SRCREV = "4d64324a8910ad28b3157f902c35f19fcb479bc0"