diff --git a/debian/changelog b/debian/changelog index fd83975..5397b5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,45 +1,51 @@ +mirakuru (2.4.2-1~~swh1) unstable-swh; urgency=medium + + * New upstream release + + -- David Douard Thu, 17 Feb 2022 17:16:52 +0100 + mirakuru (2.1.0-2~~swh2) unstable-swh; urgency=medium * Build-Depend on netcat-openbsd instead of netcat-traditional * Don't fail tests on unexpected xfail passes -- Nicolas Dandrimont Wed, 17 Mar 2021 13:43:47 +0100 mirakuru (2.1.0-2~~swh1) unstable-swh; urgency=medium * Remove .coverage from installed directory -- Nicolas Dandrimont Wed, 23 Oct 2019 17:04:39 +0200 mirakuru (2.1.0-1~~swh1) unstable-swh; urgency=medium * New upstream release -- Nicolas Dandrimont Wed, 23 Oct 2019 15:17:23 +0200 mirakuru (1.1.0-1~swh3) unstable-swh; urgency=medium * Bump package version again -- Nicolas Dandrimont Thu, 07 Feb 2019 19:06:34 +0100 mirakuru (1.1.0-1~swh2) unstable-swh; urgency=medium * Bump package version -- Nicolas Dandrimont Thu, 07 Feb 2019 18:54:28 +0100 mirakuru (1.1.0-1~swh1) unstable-swh; urgency=medium * New upstream release 1.1.0 - (tagged by Antoine R. Dumont (@ardumont) on 2019-01-31 09:39:49 +0100) * Upstream changes: - New upstream version 1.1.0 -- Software Heritage autobuilder (on jenkins-debian1) Fri, 01 Feb 2019 14:23:23 +0000 mirakuru (1.1.0) unstable; urgency=medium * Initial release -- Antoine R. Dumont (@ardumont) Thu, 31 Jan 2019 09:41:58 +0100 diff --git a/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch b/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch index dc89385..03bd6cc 100644 --- a/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch +++ b/debian/patches/0001-Update-tests-to-use-python3-instead-of-python.patch @@ -1,58 +1,54 @@ From: Nicolas Dandrimont Date: Wed, 23 Oct 2019 15:20:06 +0200 Subject: Update tests to use python3 instead of python --- tests/executors/test_executor.py | 16 ++++++++-------- tests/executors/test_executor_kill.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) -diff --git a/tests/executors/test_executor.py b/tests/executors/test_executor.py -index 8500e4b..4081a22 100644 --- a/tests/executors/test_executor.py +++ b/tests/executors/test_executor.py -@@ -229,14 +229,14 @@ def test_executor_methods_returning_self(): - def test_mirakuru_cleanup(): +@@ -255,14 +255,14 @@ def test_executor_methods_returning_self + def test_mirakuru_cleanup() -> None: """Test if cleanup_subprocesses is fired correctly on python exit.""" - cmd = f''' + cmd = f""" - python -c 'from mirakuru import SimpleExecutor; - from time import sleep; - import gc; - gc.disable(); - ex = SimpleExecutor( - ("python", "{SAMPLE_DAEMON_PATH}")).start(); - sleep(1); - ' + python3 -c 'from mirakuru import SimpleExecutor; + from time import sleep; + import gc; + gc.disable(); + ex = SimpleExecutor( + ("python3", "{SAMPLE_DAEMON_PATH}")).start(); + sleep(1); + ' - ''' - check_output(shlex.split(cmd.replace('\n', ''))) + """ + check_output(shlex.split(cmd.replace("\n", ""))) assert SAMPLE_DAEMON_PATH not in ps_aux() -diff --git a/tests/executors/test_executor_kill.py b/tests/executors/test_executor_kill.py -index ce5f42e..3e9dc0f 100644 --- a/tests/executors/test_executor_kill.py +++ b/tests/executors/test_executor_kill.py -@@ -38,7 +38,7 @@ def test_kill_custom_signal_kill(): - - def test_already_closed(): +@@ -42,7 +42,7 @@ def test_kill_custom_signal_kill() -> No + def test_already_closed() -> None: """Check that the executor cleans after itself after it exited earlier.""" -- with SimpleExecutor('python') as executor: -+ with SimpleExecutor('python3') as executor: - assert executor.running() - os.killpg(executor.process.pid, SIGKILL) + with pytest.raises(ProcessFinishedWithError) as excinfo: +- with SimpleExecutor("python") as executor: ++ with SimpleExecutor("python3") as executor: + assert executor.running() + os.killpg(executor.process.pid, SIGKILL) -@@ -63,7 +63,7 @@ def test_daemons_killing(): +@@ -64,7 +64,7 @@ def test_daemons_killing() -> None: change the process group ID. This test verifies that daemon process is killed after executor's kill(). """ -- executor = SimpleExecutor(('python', SAMPLE_DAEMON_PATH), shell=True) -+ executor = SimpleExecutor(('python3', SAMPLE_DAEMON_PATH), shell=True) +- executor = SimpleExecutor(("python", SAMPLE_DAEMON_PATH), shell=True) ++ executor = SimpleExecutor(("python3", SAMPLE_DAEMON_PATH), shell=True) executor.start() time.sleep(2) - assert executor.running() is not True, \ + assert ( diff --git a/debian/patches/0002-Use-proper-nc-l-p-commands-for-tests.patch b/debian/patches/0002-Use-proper-nc-l-p-commands-for-tests.patch index e40ac52..5a98999 100644 --- a/debian/patches/0002-Use-proper-nc-l-p-commands-for-tests.patch +++ b/debian/patches/0002-Use-proper-nc-l-p-commands-for-tests.patch @@ -1,30 +1,28 @@ From: Nicolas Dandrimont Date: Wed, 23 Oct 2019 16:13:48 +0200 Subject: Use proper nc -l -p commands for tests --- tests/executors/test_tcp_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/tests/executors/test_tcp_executor.py b/tests/executors/test_tcp_executor.py -index 2dd2920..e32ba6f 100644 --- a/tests/executors/test_tcp_executor.py +++ b/tests/executors/test_tcp_executor.py -@@ -18,7 +18,7 @@ HTTP_SERVER = f'{HTTP_SERVER_CMD} {PORT}' +@@ -18,7 +18,7 @@ from tests import HTTP_SERVER_CMD + PORT = 7986 - def test_start_and_wait(): - """Test if executor await for process to accept connections.""" -- command = 'bash -c "sleep 2 && nc -l 3000"' -+ command = 'bash -c "sleep 2 && nc -l -p 3000"' - executor = TCPExecutor(command, 'localhost', port=3000, timeout=5) - executor.start() + HTTP_SERVER = f"{HTTP_SERVER_CMD} {PORT}" +-NC_COMMAND = 'bash -c "sleep 2 && nc -lk 3000"' ++NC_COMMAND = 'bash -c "sleep 2 && nc -lk -p 3000"' -@@ -32,7 +32,7 @@ def test_start_and_wait(): - def test_it_raises_error_on_timeout(): + def test_start_and_wait(caplog: LogCaptureFixture) -> None: +@@ -40,7 +40,7 @@ def test_repr_and_str() -> None: + + def test_it_raises_error_on_timeout() -> None: """Check if TimeoutExpired gets raised correctly.""" -- command = 'bash -c "sleep 10 && nc -l 3000"' -+ command = 'bash -c "sleep 10 && nc -l -p 3000"' - executor = TCPExecutor(command, host='localhost', port=3000, timeout=2) +- command = 'bash -c "sleep 10 && nc -lk 3000"' ++ command = 'bash -c "sleep 10 && nc -lk -p 3000"' + executor = TCPExecutor(command, host="localhost", port=3000, timeout=2) with pytest.raises(TimeoutExpired): diff --git a/debian/rules b/debian/rules index abdab42..2b1f6b0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,10 @@ #!/usr/bin/make -f export PYBUILD_NAME=mirakuru export PYBUILD_TEST_ARGS=-o xfail_strict=False %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_install: dh_auto_install rm -r $(CURDIR)/debian/*/usr/lib/python3.*/dist-packages/.coverage - rm -r $(CURDIR)/debian/*/usr/lib/python3.*/dist-packages/.pytest_cache