17
0

6 Commits

Author SHA256 Message Date
b4ad08b8dc - Add patch support-pytest-9.patch:
* Import from pytest, falling back to pytest_subtests.
2025-11-28 12:00:51 +11:00
85d0cb9c39 - Only require pytest-subtests with pytest < 9. 2025-11-27 19:20:38 +11:00
9ffa28a405 Add patch python314.patch
gh#saltstack/pytest-shell-utilities#57
2025-11-17 10:55:17 +01:00
a747de2ffd Accepting request 1222983 from devel:languages:python:pytest
- update to 1.9.7:
  * Rigid support for net_connections was causing breakages,
    hence monitor version of psutil and call connections
    vs net_connections appropriately
  * Need psutil >= 6.0.0 to use net_connections
  * fix: handle process shutdown with limited permissions
  * Support for psutil 6.0.0

OBS-URL: https://build.opensuse.org/request/show/1222983
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-shell-utilities?expand=0&rev=6
2024-11-09 19:58:57 +00:00
267f6cb99d OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shell-utilities?expand=0&rev=15 2024-11-09 15:49:32 +00:00
d8608ad02e Accepting request 1222697 from home:PSuarezHernandez:branches:devel:languages:python:pytest
- update to 1.9.7:
  * Rigid support for net_connections was causing breakages,
    hence monitor version of psutil and call connections
    vs net_connections appropriately
  * Need psutil >= 6.0.0 to use net_connections
  * fix: handle process shutdown with limited permissions
  * Support for psutil 6.0.0

OBS-URL: https://build.opensuse.org/request/show/1222697
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-shell-utilities?expand=0&rev=14
2024-11-09 15:49:07 +00:00
6 changed files with 104 additions and 9 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e9ae85f8c64dd2b95e35ed1f110a90e25d498cb1af946be7cf1b7f069c089499
size 80895

Binary file not shown.

View File

@@ -1,3 +1,27 @@
-------------------------------------------------------------------
Fri Nov 28 01:00:22 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Only require pytest-subtests with pytest < 9.
- Add patch support-pytest-9.patch:
* Import from pytest, falling back to pytest_subtests.
-------------------------------------------------------------------
Mon Nov 17 09:53:35 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Add patch python314.patch to make tests compatible with python 3.14
gh#saltstack/pytest-shell-utilities#57
-------------------------------------------------------------------
Thu Nov 7 13:31:16 UTC 2024 - Pablo Suárez Hernández <psuarezhernandez@suse.com>
- update to 1.9.7:
* Rigid support for net_connections was causing breakages,
hence monitor version of psutil and call connections
vs net_connections appropriately
* Need psutil >= 6.0.0 to use net_connections
* fix: handle process shutdown with limited permissions
* Support for psutil 6.0.0
-------------------------------------------------------------------
Fri Mar 1 10:20:21 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -26,12 +26,16 @@
%endif
%{?sle15_python_module_pythons}
Name: python-pytest-shell-utilities%{psuffix}
Version: 1.9.0
Version: 1.9.7
Release: 0
Summary: Pytest plugin to simplify running shell commands against the system
License: Apache-2.0
URL: https://github.com/saltstack/pytest-shell-utilities
Source: https://files.pythonhosted.org/packages/source/p/pytest-shell-utilities/pytest-shell-utilities-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/p/pytest-shell-utilities/pytest_shell_utilities-%{version}.tar.gz
# PATCH-FIX-UPSTREAM python314.patch gh#saltstack/pytest-shell-utilities#57
Patch0: python314.patch
# PATCH-FIX-UPSTREAM gh#saltstack/pytest-shell-utilities#58
Patch1: support-pytest-9.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 50.3.2}
BuildRequires: %{python_module setuptools_scm >= 3.4}
@@ -41,18 +45,18 @@ BuildRequires: python-rpm-macros
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module attrs >= 22.1.0}
BuildRequires: %{python_module psutil >= 5.0.0}
BuildRequires: %{python_module psutil >= 6.0.0}
BuildRequires: %{python_module pytest >= 7.3.0}
BuildRequires: %{python_module pytest-helpers-namespace}
BuildRequires: %{python_module pytest-shell-utilities = %{version}}
BuildRequires: %{python_module pytest-skip-markers}
BuildRequires: %{python_module pytest-subtests}
BuildRequires: %{python_module pytest-subtests if %python-pytest < 9}
BuildRequires: %{python_module typing-extensions}
%endif
# /SECTION
BuildRequires: fdupes
Requires: python-attrs >= 22.1.0
Requires: python-psutil >= 5.0.0
Requires: python-psutil >= 6.0.0
Requires: python-pytest >= 7.3.0
Requires: python-pytest-helpers-namespace
Requires: python-pytest-skip-markers
@@ -64,7 +68,7 @@ BuildArch: noarch
Pytest plugin to simplify running shell commands against the system
%prep
%setup -q -n pytest-shell-utilities-%{version}
%autosetup -p1 -n pytest_shell_utilities-%{version}
%build
%pyproject_wheel

22
python314.patch Normal file
View File

@@ -0,0 +1,22 @@
From c8edc1e1060b48de2da5f6c5fa08789b5f1bc783 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <daniel.garcia@suse.com>
Date: Mon, 17 Nov 2025 10:48:36 +0100
Subject: [PATCH] test: Set start method to "fork" in test_daemon
Fix https://github.com/saltstack/pytest-shell-utilities/issues/56
---
tests/functional/shell/test_daemon.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/functional/shell/test_daemon.py b/tests/functional/shell/test_daemon.py
index 8f2f32d..86c1f76 100644
--- a/tests/functional/shell/test_daemon.py
+++ b/tests/functional/shell/test_daemon.py
@@ -48,6 +48,7 @@ def test_daemon_process_termination(request: FixtureRequest, tempfiles: Tempfile
import time
import multiprocessing
+ multiprocessing.set_start_method('fork')
def spin():
while True:

45
support-pytest-9.patch Normal file
View File

@@ -0,0 +1,45 @@
From b6f26e62a20fc8c42635a2b868e8915cc2a0b21d Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Fri, 28 Nov 2025 11:27:17 +1100
Subject: [PATCH] Support pytest 9
pytest 9 has included support for subtests, marking pytest_subtests as
unmaintained at the same time -- attempt to import from pytest first,
falling back to pytest_subtests if required.
---
tests/functional/shell/test_script_subprocess.py | 5 ++++-
tests/unit/utils/processes/test_processresult.py | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/functional/shell/test_script_subprocess.py b/tests/functional/shell/test_script_subprocess.py
index 3bbc6d5..3255056 100644
--- a/tests/functional/shell/test_script_subprocess.py
+++ b/tests/functional/shell/test_script_subprocess.py
@@ -8,7 +8,10 @@
from typing import cast
import pytest
-from pytest_subtests import SubTests
+try:
+ from pytest import Subtests as SubTests
+except ImportError:
+ from pytest_subtests import SubTests
from pytestshellutils.customtypes import EnvironDict
from pytestshellutils.exceptions import FactoryTimeout
diff --git a/tests/unit/utils/processes/test_processresult.py b/tests/unit/utils/processes/test_processresult.py
index 3ab90fd..5c88a52 100644
--- a/tests/unit/utils/processes/test_processresult.py
+++ b/tests/unit/utils/processes/test_processresult.py
@@ -8,7 +8,10 @@
import textwrap
import pytest
-from pytest_subtests import SubTests
+try:
+ from pytest import Subtests as SubTests
+except ImportError:
+ from pytest_subtests import SubTests
from pytestshellutils.utils.processes import ProcessResult