diff --git a/SPECS/python-daemon/python-daemon-3.0.1-fix-ptest-deprecated-assertEquals-with-assertEqual.patch b/SPECS/python-daemon/python-daemon-3.0.1-fix-ptest-deprecated-assertEquals-with-assertEqual.patch new file mode 100644 index 00000000000..073573b4e00 --- /dev/null +++ b/SPECS/python-daemon/python-daemon-3.0.1-fix-ptest-deprecated-assertEquals-with-assertEqual.patch @@ -0,0 +1,27 @@ +From f5ed6cdd0a9fa3c0ce6d5b862d10da253945e791 Mon Sep 17 00:00:00 2001 +From: Ben Finney +Date: Oct 12 2023 22:25:06 +0000 +Subject: Migrate TestCase method to current name ‘assertEqual’. + +Upstream Patch Reference: +https://pagure.io/python-daemon/c/f5ed6cdd0a9fa3c0ce6d5b862d10da253945e791.patch +--- + test/test_daemon.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test_daemon.py b/test/test_daemon.py +index 16df21e..77a0c08 100644 +--- a/test/test_daemon.py ++++ b/test/test_daemon.py +@@ -2247,7 +2247,7 @@ class set_signal_handlers_TestCase(scaffold.TestCase): + unittest.mock.call(signal_number, handler) + for (signal_number, handler) in signal_handler_map.items()] + daemon.daemon.set_signal_handlers(signal_handler_map) +- self.assertEquals(expected_calls, mock_func_signal_signal.mock_calls) ++ self.assertEqual(expected_calls, mock_func_signal_signal.mock_calls) + + + @unittest.mock.patch.object(daemon.daemon.atexit, "register") +-- +2.45.4 + diff --git a/SPECS/python-daemon/python-daemon.spec b/SPECS/python-daemon/python-daemon.spec index 8df66840d3f..a446789cab0 100644 --- a/SPECS/python-daemon/python-daemon.spec +++ b/SPECS/python-daemon/python-daemon.spec @@ -1,13 +1,14 @@ Summary: Library to implement a well-behaved Unix daemon process. Name: python-daemon Version: 3.0.1 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 Vendor: Microsoft Corporation Distribution: Azure Linux Group: Development/Languages/Python URL: https://pypi.python.org/pypi/python-daemon/ Source0: https://files.pythonhosted.org/packages/source/p/python-daemon/%{name}-%{version}.tar.gz +Patch0: python-daemon-3.0.1-fix-ptest-deprecated-assertEquals-with-assertEqual.patch BuildArch: noarch %description @@ -35,7 +36,7 @@ daemon program. A DaemonContext instance holds the behaviour and configured proc use the instance as a context manager to enter a daemon state. %prep -%autosetup +%autosetup -p1 %build %py3_build @@ -52,6 +53,10 @@ pip3 install mock testscenarios testtools %{python3_sitelib}/* %changelog +* Mon Feb 23 2026 Ratiranjan Behera - 3.0.1-2 +- Fix ptest regression on Azure Linux 3.0 by replacing deprecated unittest + assertEquals() with assertEqual() in python-daemon tests (TASK 16234) + * Wed May 08 2024 Sam Meluch - 3.0.1-1 - Upgrade package to latest version