From 9c7b40d19054bdd71ab6a41f64a9238de62ee1bd95a2829ec35220128119ad3d Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 5 Jan 2026 14:33:06 +1100 Subject: [PATCH] - Update to 0.8.1 * Upstream changelog omitted for clarity - Drop patch i586.patch, merged upstream. --- i586.patch | 133 ----------------------------- pytest_run_parallel-0.4.2.tar.gz | 3 - pytest_run_parallel-0.8.1.tar.gz | 3 + python-pytest-run-parallel.changes | 41 +++++++++ python-pytest-run-parallel.spec | 10 +-- 5 files changed, 49 insertions(+), 141 deletions(-) delete mode 100644 i586.patch delete mode 100644 pytest_run_parallel-0.4.2.tar.gz create mode 100644 pytest_run_parallel-0.8.1.tar.gz diff --git a/i586.patch b/i586.patch deleted file mode 100644 index 7c7a115..0000000 --- a/i586.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 1d51e5706a9983c99761c7a65e6d79cfb9bf7462 Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Thu, 24 Apr 2025 08:42:02 -0600 -Subject: [PATCH 1/2] attempt to fix 32 bit architectures - ---- - src/pytest_run_parallel/plugin.py | 79 ++++++++++++++++--------------- - 1 file changed, 41 insertions(+), 38 deletions(-) - -diff --git a/src/pytest_run_parallel/plugin.py b/src/pytest_run_parallel/plugin.py -index 42d3d03..dc419b1 100644 ---- a/src/pytest_run_parallel/plugin.py -+++ b/src/pytest_run_parallel/plugin.py -@@ -65,52 +65,55 @@ def pytest_configure(config): - - - def wrap_function_parallel(fn, n_workers, n_iterations): -- barrier = threading.Barrier(n_workers) -- original_switch = sys.getswitchinterval() -- sys.setswitchinterval(0.000001) -- - @functools.wraps(fn) - def inner(*args, **kwargs): - errors = [] - skip = None - failed = None -- -- def closure(*args, **kwargs): -- for _ in range(n_iterations): -- barrier.wait() -- try: -- fn(*args, **kwargs) -- except Warning: -- pass -- except Exception as e: -- errors.append(e) -- except _pytest.outcomes.Skipped as s: -- nonlocal skip -- skip = s.msg -- except _pytest.outcomes.Failed as f: -- nonlocal failed -- failed = f -- -- workers = [] -- for _ in range(0, n_workers): -- worker_kwargs = kwargs -- workers.append( -- threading.Thread(target=closure, args=args, kwargs=worker_kwargs) -- ) -- -- num_completed = 0 -+ barrier = threading.Barrier(n_workers) -+ original_switch = sys.getswitchinterval() - try: -- for worker in workers: -- worker.start() -- num_completed += 1 -- finally: -- if num_completed < len(workers): -- barrier.abort() -+ sys.setswitchinterval(0.000001) -+ -+ def closure(*args, **kwargs): -+ for _ in range(n_iterations): -+ barrier.wait() -+ try: -+ fn(*args, **kwargs) -+ except Warning: -+ pass -+ except Exception as e: -+ errors.append(e) -+ except _pytest.outcomes.Skipped as s: -+ nonlocal skip -+ skip = s.msg -+ except _pytest.outcomes.Failed as f: -+ nonlocal failed -+ failed = f -+ -+ workers = [] -+ for _ in range(0, n_workers): -+ worker_kwargs = kwargs -+ workers.append( -+ threading.Thread( -+ target=closure, args=args, kwargs=worker_kwargs -+ ) -+ ) -+ -+ num_completed = 0 -+ try: -+ for worker in workers: -+ worker.start() -+ num_completed += 1 -+ finally: -+ if num_completed < len(workers): -+ barrier.abort() - -- for worker in workers: -- worker.join() -+ for worker in workers: -+ worker.join() - -- sys.setswitchinterval(original_switch) -+ finally: -+ sys.setswitchinterval(original_switch) - - if skip is not None: - pytest.skip(skip) - -From feed20573c21c15178793186beffe984b60ec17f Mon Sep 17 00:00:00 2001 -From: "pre-commit-ci-lite[bot]" - <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> -Date: Thu, 24 Apr 2025 14:47:11 +0000 -Subject: [PATCH 2/2] [pre-commit.ci lite] apply automatic fixes - ---- - src/pytest_run_parallel/plugin.py | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/pytest_run_parallel/plugin.py b/src/pytest_run_parallel/plugin.py -index dc419b1..5548cba 100644 ---- a/src/pytest_run_parallel/plugin.py -+++ b/src/pytest_run_parallel/plugin.py -@@ -95,9 +95,7 @@ def closure(*args, **kwargs): - for _ in range(0, n_workers): - worker_kwargs = kwargs - workers.append( -- threading.Thread( -- target=closure, args=args, kwargs=worker_kwargs -- ) -+ threading.Thread(target=closure, args=args, kwargs=worker_kwargs) - ) - - num_completed = 0 diff --git a/pytest_run_parallel-0.4.2.tar.gz b/pytest_run_parallel-0.4.2.tar.gz deleted file mode 100644 index ef5f890..0000000 --- a/pytest_run_parallel-0.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6e97cbbf5cdc754d37cdd35acf53e3174a748db070c8367ca526963c14fdb05 -size 48756 diff --git a/pytest_run_parallel-0.8.1.tar.gz b/pytest_run_parallel-0.8.1.tar.gz new file mode 100644 index 0000000..9c5ed1c --- /dev/null +++ b/pytest_run_parallel-0.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:459f5fcf4cb63c64edbe48c74f68d6b41a217289e3e2f2d105d3175ddc0ada93 +size 66320 diff --git a/python-pytest-run-parallel.changes b/python-pytest-run-parallel.changes index 98d12fb..73c6037 100644 --- a/python-pytest-run-parallel.changes +++ b/python-pytest-run-parallel.changes @@ -1,3 +1,44 @@ +------------------------------------------------------------------- +Mon Jan 5 03:32:42 UTC 2026 - Steve Kowalik + +- Update to 0.8.1: + * Only run logic for selected pytest items + * fix: add capteesys, capsysbinary, capfd and capfdbinary to thread-unsafe + fixtures + * Update license infomation format in pyproject.toml + * Fix typos discovered by codespell + * Add a parallel_threads_limit mark + * Detect gc.collect and mark tests as thread unsafe + * Fix --forever interaction with pytest-xdist + * Create thread_id and iteration_id fixtures + * Patch tmp_path/tmpdir to be thread-safe + * globals and AST parsing exception handling + * Add option --forever to keep running tests in a never-ending loop + * Fix thread-unsafe detection for indented tests + * Run coverage externally to load before plugins + * Support Python 3.14 + * Change hypothesis check to be version based + * Handle functions with __module__ is None + * Refactor plugin into multiple files + * Support chained attributes in thread unsafe detection + * Improvements to thread safety detection and implement disallowing whole + modules + * Skip analyzing doctests and add num_parallel_threads fixture everywhere + * adjust terminal summary when skip-thread-unsafe is set + * Strip leading whitespace instead of dedent for test source code + * Avoid AttributeError in terminalsummary + * Rewrite pytest hooks as a class plugin + * Remove cliff since we don't use it + * Fix failures report when test is marked as thread-unsafe + * Add an option to skip thread-unsafe tests + * detect unitest.mock use and skip parallel tests for tests that use it + * attempt to fix 32 bit architectures + * Add monkeypatch to thread-unsafe fixtures + * use an lru_cache to speed up recursive ast parsing + * Set switch interval in a loop with increasing numbers + * Fix tests on Linux when psutil is installed +- Drop patch i586.patch, merged upstream. + ------------------------------------------------------------------- Thu Apr 24 11:10:29 UTC 2025 - Markéta Machová diff --git a/python-pytest-run-parallel.spec b/python-pytest-run-parallel.spec index c33b94d..ac60ceb 100644 --- a/python-pytest-run-parallel.spec +++ b/python-pytest-run-parallel.spec @@ -17,24 +17,23 @@ Name: python-pytest-run-parallel -Version: 0.4.2 +Version: 0.8.1 Release: 0 Summary: A simple pytest plugin to run tests concurrently License: MIT URL: https://github.com/Quansight-Labs/pytest-run-parallel Source: https://files.pythonhosted.org/packages/source/p/pytest-run-parallel/pytest_run_parallel-%{version}.tar.gz -# PATCH-FIX-UPSTREAM https://github.com/Quansight-Labs/pytest-run-parallel/pull/54 attempt to fix 32 bit architectures -Patch: i586.patch BuildRequires: python-rpm-macros BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 61.0.0} # SECTION test requirements -BuildRequires: %{python_module pytest >= 6.2.0} +BuildRequires: %{python_module pytest >= 8.4.0} BuildRequires: %{python_module pytest-order} +BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module hypothesis} # /SECTION BuildRequires: fdupes -Requires: python-pytest >= 6.2.0 +Requires: python-pytest >= 8.4.0 Suggests: python-psutil >= 6.1.1 BuildArch: noarch %python_subpackages @@ -57,6 +56,7 @@ A simple pytest plugin to run tests concurrently %files %{python_files} %license LICENSE +%doc README.md %{python_sitelib}/pytest_run_parallel %{python_sitelib}/pytest_run_parallel-%{version}.dist-info -- 2.51.1