Skip to content

Commit 7d4dc97

Browse files
authored
Fix ptest regression in python-daemon on arm64 [Work Item: # 16234] (#15960)
1 parent 62cf025 commit 7d4dc97

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From f5ed6cdd0a9fa3c0ce6d5b862d10da253945e791 Mon Sep 17 00:00:00 2001
2+
From: Ben Finney <ben+python@benfinney.id.au>
3+
Date: Oct 12 2023 22:25:06 +0000
4+
Subject: Migrate TestCase method to current name ‘assertEqual’.
5+
6+
Upstream Patch Reference:
7+
https://pagure.io/python-daemon/c/f5ed6cdd0a9fa3c0ce6d5b862d10da253945e791.patch
8+
---
9+
test/test_daemon.py | 2 +-
10+
1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+
diff --git a/test/test_daemon.py b/test/test_daemon.py
13+
index 16df21e..77a0c08 100644
14+
--- a/test/test_daemon.py
15+
+++ b/test/test_daemon.py
16+
@@ -2247,7 +2247,7 @@ class set_signal_handlers_TestCase(scaffold.TestCase):
17+
unittest.mock.call(signal_number, handler)
18+
for (signal_number, handler) in signal_handler_map.items()]
19+
daemon.daemon.set_signal_handlers(signal_handler_map)
20+
- self.assertEquals(expected_calls, mock_func_signal_signal.mock_calls)
21+
+ self.assertEqual(expected_calls, mock_func_signal_signal.mock_calls)
22+
23+
24+
@unittest.mock.patch.object(daemon.daemon.atexit, "register")
25+
--
26+
2.45.4
27+

SPECS/python-daemon/python-daemon.spec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Summary: Library to implement a well-behaved Unix daemon process.
22
Name: python-daemon
33
Version: 3.0.1
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: ASL 2.0
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
88
Group: Development/Languages/Python
99
URL: https://pypi.python.org/pypi/python-daemon/
1010
Source0: https://files.pythonhosted.org/packages/source/p/python-daemon/%{name}-%{version}.tar.gz
11+
Patch0: python-daemon-3.0.1-fix-ptest-deprecated-assertEquals-with-assertEqual.patch
1112
BuildArch: noarch
1213

1314
%description
@@ -35,7 +36,7 @@ daemon program. A DaemonContext instance holds the behaviour and configured proc
3536
use the instance as a context manager to enter a daemon state.
3637

3738
%prep
38-
%autosetup
39+
%autosetup -p1
3940

4041
%build
4142
%py3_build
@@ -52,6 +53,10 @@ pip3 install mock testscenarios testtools
5253
%{python3_sitelib}/*
5354

5455
%changelog
56+
* Mon Feb 23 2026 Ratiranjan Behera <v-ratbehera@microsoft.com> - 3.0.1-2
57+
- Fix ptest regression on Azure Linux 3.0 by replacing deprecated unittest
58+
assertEquals() with assertEqual() in python-daemon tests (TASK 16234)
59+
5560
* Wed May 08 2024 Sam Meluch <sammeluch@microsoft.com> - 3.0.1-1
5661
- Upgrade package to latest version
5762

0 commit comments

Comments
 (0)