Fix pytest 9 compatibility: py.path.local arguments deprecated
This commit is contained in:
parent
a6707724d5
commit
21379f8004
2 changed files with 33 additions and 0 deletions
31
aa2b9e3.patch
Normal file
31
aa2b9e3.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
From aa2b9e3e9545bb64cd873d626bcb4b2724cd3786 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Levin <slev@altlinux.org>
|
||||
Date: Tue, 24 Feb 2026 19:12:59 +0300
|
||||
Subject: [PATCH] tests: replace deprecated path parameter for
|
||||
pytest_ignore_collect hook
|
||||
|
||||
https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
|
||||
|
||||
> py.path.local arguments for hooks replaced with pathlib.Path
|
||||
Deprecated since version 7.0.
|
||||
Removed in version 9.0.
|
||||
|
||||
Fixes: https://github.com/Ultimaker/Uranium/issues/1030
|
||||
Signed-off-by: Stanislav Levin <slev@altlinux.org>
|
||||
---
|
||||
tests/benchmarks/conftest.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/benchmarks/conftest.py b/tests/benchmarks/conftest.py
|
||||
index 6fc1c9ebde..845708d961 100644
|
||||
--- a/tests/benchmarks/conftest.py
|
||||
+++ b/tests/benchmarks/conftest.py
|
||||
@@ -7,7 +7,7 @@
|
||||
warn = True
|
||||
|
||||
@pytest.hookimpl
|
||||
-def pytest_ignore_collect(path, config):
|
||||
+def pytest_ignore_collect(collection_path, config):
|
||||
if config.pluginmanager.hasplugin("pytest-benchmark"):
|
||||
return False
|
||||
else:
|
||||
|
|
@ -5,6 +5,8 @@ Summary: A Python framework for building desktop applications
|
|||
License: LGPL-3.0-or-later
|
||||
URL: https://github.com/Ultimaker/Uranium
|
||||
Source: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
|
||||
# Fix pytest 9 compatibility: py.path.local arguments deprecated
|
||||
Patch: https://github.com/Ultimaker/Uranium/commit/aa2b9e3.patch
|
||||
Patch: Uranium-5.3.0-qt-try-ints-then-bytes-for-gl-mask-functions.patch
|
||||
# Fix asserts for called once in Python 3.12:
|
||||
Patch: https://github.com/Ultimaker/Uranium/pull/885.patch#/Uranium-5.3.0-python3.12.patch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue