sentry-arroyo 2.20.7__py3-none-any.whl → 2.20.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -581,7 +581,7 @@ class RunTaskWithMultiprocessing(
581
581
  self.__metrics.increment("sigchld.detected")
582
582
  raise ChildProcessTerminated(signum)
583
583
 
584
- signal.signal(signal.SIGCHLD, handle_sigchld)
584
+ self.original_sigchld = signal.signal(signal.SIGCHLD, handle_sigchld)
585
585
 
586
586
  def __submit_batch(self, input_block_too_small: bool) -> None:
587
587
  assert self.__batch_builder is not None
@@ -839,14 +839,19 @@ class RunTaskWithMultiprocessing(
839
839
  # compression.)
840
840
  self.__batch_builder.append(message)
841
841
 
842
- def close(self) -> None:
842
+ def _do_close(self) -> None:
843
843
  self.__closed = True
844
844
 
845
+ signal.signal(signal.SIGCHLD, self.original_sigchld)
846
+
847
+ def close(self) -> None:
848
+ self._do_close()
849
+
845
850
  if self.__batch_builder is not None and len(self.__batch_builder) > 0:
846
851
  self.__submit_batch(False)
847
852
 
848
853
  def terminate(self) -> None:
849
- self.__closed = True
854
+ self._do_close()
850
855
 
851
856
  logger.info("Terminating %r...", self.__pool)
852
857
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry-arroyo
3
- Version: 2.20.7
3
+ Version: 2.20.8
4
4
  Summary: Arroyo is a Python library for working with streaming data.
5
5
  Home-page: https://github.com/getsentry/arroyo
6
6
  Author: Sentry
@@ -30,7 +30,7 @@ arroyo/processing/strategies/produce.py,sha256=LUsg2bsVsguc2fTbueTbqLeg3mbnk_FOf
30
30
  arroyo/processing/strategies/reduce.py,sha256=xv9bYisgHHyS8fVD1PdGi4TJsaK-4RAhMEDh4WHhYfI,3933
31
31
  arroyo/processing/strategies/run_task.py,sha256=MGe2UcIWN7FkPc9plKzRVUNbZ7Sk0jWjw1z2vVOFI_I,2160
32
32
  arroyo/processing/strategies/run_task_in_threads.py,sha256=f1sb2AG-BLz11X78jfhtERIkdFogrV8vtdT3pyJdkx0,6144
33
- arroyo/processing/strategies/run_task_with_multiprocessing.py,sha256=jNb_e3hcXDlnLE0XCgVjbLHXrob8V53aPGeMWtu4ToI,34417
33
+ arroyo/processing/strategies/run_task_with_multiprocessing.py,sha256=jOL6SKLyrTuCsOkFDl5eOLQzr79bo_yZiuE1d9rhnfA,34558
34
34
  arroyo/processing/strategies/unfold.py,sha256=bi47pwmKGT0Irsx0HdB7Bhc5hb-yYqLF_xcv3g1ewTk,4231
35
35
  arroyo/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  arroyo/utils/clock.py,sha256=r2EMO4nL5qIb1xnAd1sTAk2yK1UltyUi04lk5BqWKIc,944
@@ -46,7 +46,7 @@ examples/transform_and_produce/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
46
46
  examples/transform_and_produce/batched.py,sha256=st2R6qTneAtV0JFbKP30Ti3sJDYj8Jkbmta9JckKdZU,2636
47
47
  examples/transform_and_produce/script.py,sha256=8kSMIjQNqGYEVyE0PvrfJh-a_UYCrJSstTp_De7kyyg,2306
48
48
  examples/transform_and_produce/simple.py,sha256=H7xqxItjl4tx34wVW5dy6mB9G39QucAtxkJSBzVmjgA,1637
49
- sentry_arroyo-2.20.7.dist-info/licenses/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
49
+ sentry_arroyo-2.20.8.dist-info/licenses/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
50
50
  tests/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  tests/backends/mixins.py,sha256=sfNyE0VTeiD3GHOnBYl-9urvPuURI2G1BWke0cz7Dvc,20445
52
52
  tests/backends/test_commit.py,sha256=iTHfK1qsBxim0XwxgMvNNSMqDUMEHoYkYBDcgxGBFbs,831
@@ -66,13 +66,13 @@ tests/processing/strategies/test_produce.py,sha256=UQ03quIAvfnsg8Og7US6D4ERs-J8n
66
66
  tests/processing/strategies/test_reduce.py,sha256=crPFtGp7cyD8QOsmfVsyYh8KLOTzb8ryI7XtYg0vQSQ,1101
67
67
  tests/processing/strategies/test_run_task.py,sha256=bWIy4U6QyOBtqdiJdGLMAadlEME-W2aE_ZzDbU_BsGo,2805
68
68
  tests/processing/strategies/test_run_task_in_threads.py,sha256=5nwzF1iV6MTK1xETzWvMEOwAcZWrMOQaIPSWbiAjKFo,1457
69
- tests/processing/strategies/test_run_task_with_multiprocessing.py,sha256=iy4etaU9WLa8AfMIFUXRnS70Dj7jlpotIX7s-BhTWH0,21914
69
+ tests/processing/strategies/test_run_task_with_multiprocessing.py,sha256=eyv3O5XhVSlJZXli_WG3v_ULHJ4YXrvW7vb4X5EeZVg,22111
70
70
  tests/processing/strategies/test_unfold.py,sha256=mbC4XhT6GkJRuC7vPR0h7jqwt4cu20q7Z114EJ6J9mQ,2009
71
71
  tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
72
  tests/utils/test_concurrent.py,sha256=Gwdzym2UZ1HO3rhOSGmzxImWcLFygY8P7MXHT3Q0xTE,455
73
73
  tests/utils/test_metrics.py,sha256=bI0EtGgPokMQyEqX58i0-8zvLfxRP2nWaWr2wLMaJ_o,917
74
74
  tests/utils/test_retries.py,sha256=AxJLkXWeL9AjHv_p1n0pe8CXXJp24ZQIuYBHfNcmiz4,3075
75
- sentry_arroyo-2.20.7.dist-info/METADATA,sha256=S6XpUdxiepESBIjz7VKsIPu7kajCOyD8hBdu95tyVnQ,2200
76
- sentry_arroyo-2.20.7.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
77
- sentry_arroyo-2.20.7.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
78
- sentry_arroyo-2.20.7.dist-info/RECORD,,
75
+ sentry_arroyo-2.20.8.dist-info/METADATA,sha256=Tfi9HVQkH631_WJQGu-PjVUNjmljc9LLuuN_2rBFT8Q,2200
76
+ sentry_arroyo-2.20.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
77
+ sentry_arroyo-2.20.8.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
78
+ sentry_arroyo-2.20.8.dist-info/RECORD,,
@@ -1,8 +1,9 @@
1
1
  import multiprocessing
2
+ import signal
2
3
  import time
3
4
  from datetime import datetime
4
5
  from multiprocessing.managers import SharedMemoryManager
5
- from typing import Any
6
+ from typing import Any, Generator
6
7
  from unittest.mock import Mock, call
7
8
 
8
9
  import pytest
@@ -25,6 +26,12 @@ from tests.metrics import TestingMetricsBackend
25
26
  from tests.metrics import Timing as TimingCall
26
27
 
27
28
 
29
+ @pytest.fixture(autouse=True)
30
+ def does_not_leak_sigchild_handler() -> Generator[None, None, None]:
31
+ yield
32
+ assert isinstance(signal.getsignal(signal.SIGCHLD), int)
33
+
34
+
28
35
  def test_message_batch() -> None:
29
36
  partition = Partition(Topic("test"), 0)
30
37