14
0
forked from pool/python-nose2

8 Commits

Author SHA256 Message Date
50fd75aad9 Accepting request 1315401 from devel:languages:python
- Rip out the requirement of the wheel.whl, recent setuptools no longer
  require it.
- Add patch support-python314.patch:
  * Support Python 3.14 multiprocessing and argparse changes.

OBS-URL: https://build.opensuse.org/request/show/1315401
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nose2?expand=0&rev=18
2025-11-04 17:42:16 +00:00
fc266e0302 - Rip out the requirement of the wheel.whl, recent setuptools no longer
require it.
- Add patch support-python314.patch:
  * Support Python 3.14 multiprocessing and argparse changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nose2?expand=0&rev=39
2025-11-04 01:46:40 +00:00
8e1871b230 Accepting request 1300823 from devel:languages:python
- Convert to libalternatives on SLE-16-based and newer systems only

OBS-URL: https://build.opensuse.org/request/show/1300823
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nose2?expand=0&rev=17
2025-08-21 18:32:55 +00:00
3bec5ce076 fix URL
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nose2?expand=0&rev=37
2025-08-21 15:37:55 +00:00
f0333b5272 - Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nose2?expand=0&rev=36
2025-08-21 10:03:07 +00:00
40fb3ce81a Accepting request 1294075 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1294075
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nose2?expand=0&rev=16
2025-07-17 15:19:26 +00:00
ff552b1d78 fix spec-cleaner changes
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nose2?expand=0&rev=34
2025-07-17 09:43:34 +00:00
29f2afe441 - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nose2?expand=0&rev=33
2025-07-16 13:06:39 +00:00
4 changed files with 55 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Nov 4 01:46:07 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Rip out the requirement of the wheel.whl, recent setuptools no longer
require it.
- Add patch support-python314.patch:
* Support Python 3.14 multiprocessing and argparse changes.
-------------------------------------------------------------------
Thu Aug 21 10:02:03 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-nose2
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,8 +29,8 @@ Summary: The successor to the Python testing framework nose, based on uni
License: BSD-2-Clause AND Python-2.0
URL: https://github.com/nose-devs/nose2
Source: https://files.pythonhosted.org/packages/source/n/nose2/nose2-%{version}.tar.gz
# Required for testsuite. Bring on python-wheel wheel.
Source1: https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl
# PATCH-FIX-OPENSUSE Support Python 3.14 multiprocessing and argparse changes
Patch0: support-python314.patch
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools-wheel}
@@ -56,8 +56,6 @@ nose2's purpose is to extend unittest to make testing nicer and easier to unders
%prep
%autosetup -p1 -n nose2-%{version}
mkdir ../wheels
cp %{SOURCE1} ../wheels
%build
%pyproject_wheel
@@ -73,7 +71,7 @@ export LC_CTYPE=C.UTF8
%{python_expand # nose must test itself in an editable install
$python -m venv editable-%{$python_bin_suffix} --system-site-packages
. editable-%{$python_bin_suffix}/bin/activate
pip install --no-index --find-links %{_prefix}/lib/python%{$python_bin_suffix}/wheels --find-links ../wheels -e .
pip install --no-index --find-links %{_prefix}/lib/python%{$python_bin_suffix}/wheels -e .
nose2 -v --pretty-assert
deactivate
}

43
support-python314.patch Normal file
View File

@@ -0,0 +1,43 @@
Index: nose2-0.15.1/nose2/plugins/mp.py
===================================================================
--- nose2-0.15.1.orig/nose2/plugins/mp.py
+++ nose2-0.15.1/nose2/plugins/mp.py
@@ -1,7 +1,9 @@
+import contextlib
import logging
import multiprocessing
import multiprocessing.connection as connection
import os
+import platform
import select
import sys
import unittest
@@ -28,6 +30,11 @@ class MultiProcess(events.Plugin):
self.cases = {}
+ # This requires the broken 'fork' start method to share state.
+ if sys.version_info[:2] >= (3, 14) and platform.system() == "Linux":
+ with contextlib.suppress(RuntimeError):
+ multiprocessing.set_start_method('fork')
+
@property
def procs(self):
"""Get the appropriate number of procs for self.procs if self._procs is
Index: nose2-0.15.1/nose2/tests/unit/test_plugin_api.py
===================================================================
--- nose2-0.15.1.orig/nose2/tests/unit/test_plugin_api.py
+++ nose2-0.15.1/nose2/tests/unit/test_plugin_api.py
@@ -17,9 +17,9 @@ class TestPluginApi(TestCase):
def test_add_option_adds_option(self):
helpt = self.session.argparse.format_help()
- assert "-X, --xxx" in helpt, (
- "commandLineSwitch arg not found in help text: %s" % helpt
- )
+ # Output may be colored
+ assert "-X" in helpt
+ assert "--xxx" in helpt
def test_short_opt_registers_plugin(self):
args, argv = self.session.argparse.parse_known_args(["-X"])

Binary file not shown.