File support-pytest-9.patch of Package python-boltons

From 5bf0e99182fc910f641a0849fa209940d68bce32 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Mon, 15 Dec 2025 14:38:06 +1100
Subject: [PATCH] Support pytest 9 changes

Starting from pytest 7, the py.path arguments to pytest's hook functions
have been deprecated, replaced with pathlib.Path equivalents. Since
pytest 7 is the minimum version we support, move to using it.
---
 tests/conftest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index d4d2192c..e2c9a0cf 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -5,12 +5,12 @@
 _VERSION_MARKER = re.compile(r'_py(?P<major_version>\d)(?P<minor_version>\d)?')
 
 
-def pytest_ignore_collect(path, config):
+def pytest_ignore_collect(collection_path, config):
     """
     Ignore tests that end with _pyX, where X does not equal this
     interpreter's major version.
     """
-    filename = path.basename
+    filename = collection_path.name
     modulename = filename.split('.', 1)[0]
     match = _VERSION_MARKER.search(modulename)
     if not match:
openSUSE Build Service is sponsored by