From 04685fbc827277208c96d5e2387f13a7ab0f8cb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl>
Date: Sun, 11 Jul 2021 17:13:51 +0200
Subject: [PATCH] v2.17.14

---
 CHANGELOG.md                                     |  2 ++
 satella/__init__.py                              |  2 +-
 satella/instrumentation/memory/dump_frames_on.py |  2 +-
 tests/test_instrumentation/test_memory.py        | 10 ++++++++++
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index ecf44e46..24139359 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1 +1,3 @@
 # v2.17.14
+
+* fixed a bug in `install_dump_memory_on`
diff --git a/satella/__init__.py b/satella/__init__.py
index 87840334..6fbabca8 100644
--- a/satella/__init__.py
+++ b/satella/__init__.py
@@ -1 +1 @@
-__version__ = '2.17.14a1'
+__version__ = '2.17.14'
diff --git a/satella/instrumentation/memory/dump_frames_on.py b/satella/instrumentation/memory/dump_frames_on.py
index 710119c0..965f93ed 100644
--- a/satella/instrumentation/memory/dump_frames_on.py
+++ b/satella/instrumentation/memory/dump_frames_on.py
@@ -51,4 +51,4 @@ def install_dump_memory_on(signal_number, output: tp.TextIO = sys.stderr):
     :param output: output
     """
     signal.signal(signal_number,
-                  lambda sig_no, stack_frame: dump_memory_on(sig_no, stack_frame, output))
+                  lambda sig_no, stack_frame: dump_memory_on(output))
diff --git a/tests/test_instrumentation/test_memory.py b/tests/test_instrumentation/test_memory.py
index 44b35797..e5d0e502 100644
--- a/tests/test_instrumentation/test_memory.py
+++ b/tests/test_instrumentation/test_memory.py
@@ -1,4 +1,9 @@
 import logging
+import os
+import signal
+import sys
+
+from satella.instrumentation import install_dump_frames_on
 from satella.instrumentation.memory import MemoryPressureManager, CustomCondition, All, Any, \
     dump_memory_on
 import time
@@ -17,6 +22,11 @@ class OnDemandCondition(CustomCondition):
 
 class TestMemory(unittest.TestCase):
 
+    @unittest.skipIf(sys.platform == 'win32', 'testable only on unices')
+    def test_install_dump_on(self):
+        install_dump_frames_on(signal.SIGUSR1)
+        os.kill(0, 10)
+
     def test_dump_memory(self):
         dump_memory_on()
 
-- 
GitLab