From b78b2be0a651b1e64b2725dddb44314124a3d755 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Sat, 9 May 2026 09:17:37 +0100 Subject: [PATCH 1/5] Ignore new warning from ipykernel about encryption use first-sentence prefix matching so that we can adjust the advice that follows in following sentences without updating downstream tests --- tests/test_client.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 166beba5..8bc07730 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -308,11 +308,16 @@ def notebook_resources(): def filter_messages_on_error_output(err_output): - allowed_lines = [ + allowed_prefixes = [ # ipykernel might be installed without debugpy extension - "[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled", + "[IPKernelApp] WARNING | debugpy_stream undefined", + # ipykernel warns when kernel runs over TCP without CurveZMQ encryption + "[IPKernelApp] WARNING | Kernel is running over TCP without encryption.", + ] + filtered_result = [ + line for line in err_output.splitlines() + if not any(line.startswith(prefix) for prefix in allowed_prefixes) ] - filtered_result = [line for line in err_output.splitlines() if line not in allowed_lines] return os.linesep.join(filtered_result) From a2219800d2dd63955359270a28b6e15d5ba64981 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 08:22:00 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index 8bc07730..22131219 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -315,7 +315,8 @@ def filter_messages_on_error_output(err_output): "[IPKernelApp] WARNING | Kernel is running over TCP without encryption.", ] filtered_result = [ - line for line in err_output.splitlines() + line + for line in err_output.splitlines() if not any(line.startswith(prefix) for prefix in allowed_prefixes) ] From 2d783a2e92a5668b3716c19cb3c1f431bcca66ff Mon Sep 17 00:00:00 2001 From: M Bussonnier Date: Sun, 10 May 2026 08:44:29 +0200 Subject: [PATCH 3/5] Empty commit to trigger CI From 3360cf1238440deefaab6d8c61b5ed5cbaf49ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Krassowski?= <5832902+krassowski@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:42:29 +0100 Subject: [PATCH 4/5] Fix merge --- tests/test_client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 32b3bac6..ce500a70 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -323,18 +323,17 @@ def filter_messages_on_error_output(err_output): # Known benign race condition: kernel sends a status message on a socket already # closed during parallel shutdown. Filter the entire traceback block. in_zmq_traceback = False - filtered_result = [] - for line in lines: + final_filtered_result = [] + for line in filtered_result: if "ERROR:tornado.general:Uncaught exception in ZMQStream callback" in line: in_zmq_traceback = True if in_zmq_traceback: if "zmq.error.ZMQError: Socket operation on non-socket" in line: in_zmq_traceback = False continue - if line not in allowed_lines: - filtered_result.append(line) + final_filtered_result.append(line) - return os.linesep.join(filtered_result) + return os.linesep.join(final_filtered_result) @pytest.mark.parametrize( From e61ff3da6caaddc234fa4028bf8fda9b334a9507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Krassowski?= <5832902+krassowski@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:56:43 +0100 Subject: [PATCH 5/5] Remove unused `lines` --- tests/test_client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index ce500a70..cfbe1f9d 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -319,7 +319,6 @@ def filter_messages_on_error_output(err_output): for line in err_output.splitlines() if not any(line.startswith(prefix) for prefix in allowed_prefixes) ] - lines = err_output.splitlines() # Known benign race condition: kernel sends a status message on a socket already # closed during parallel shutdown. Filter the entire traceback block. in_zmq_traceback = False