From 85825613faa743f7ebe5aecfe4a2eddc92ebc5ae Mon Sep 17 00:00:00 2001 From: Daniel Falbel Date: Mon, 5 Jan 2026 18:11:07 -0300 Subject: [PATCH 1/2] Enable reticulate tests --- test/e2e/tests/reticulate/reticulate-multiple.test.ts | 2 +- test/e2e/tests/reticulate/reticulate-repl-python.test.ts | 2 +- test/e2e/tests/reticulate/reticulate-restart.test.ts | 2 +- test/e2e/tests/reticulate/reticulate-stop-start.test.ts | 2 +- test/e2e/tests/reticulate/reticulate-variables.test.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/e2e/tests/reticulate/reticulate-multiple.test.ts b/test/e2e/tests/reticulate/reticulate-multiple.test.ts index 81af3c73f08f..a55630b8e9f1 100644 --- a/test/e2e/tests/reticulate/reticulate-multiple.test.ts +++ b/test/e2e/tests/reticulate/reticulate-multiple.test.ts @@ -14,7 +14,7 @@ test.use({ // RETICULATE_PYTHON // to the installed python path -test.describe.skip('Reticulate', { +test.describe('Reticulate', { tag: [tags.RETICULATE, tags.WEB, tags.ARK, tags.SOFT_FAIL], }, () => { test.beforeAll(async function ({ app, settings }) { diff --git a/test/e2e/tests/reticulate/reticulate-repl-python.test.ts b/test/e2e/tests/reticulate/reticulate-repl-python.test.ts index f31a60a47f57..fc8161a5ea77 100644 --- a/test/e2e/tests/reticulate/reticulate-repl-python.test.ts +++ b/test/e2e/tests/reticulate/reticulate-repl-python.test.ts @@ -14,7 +14,7 @@ test.use({ // RETICULATE_PYTHON // to the installed python path -test.describe.skip('Reticulate', { +test.describe('Reticulate', { tag: [tags.RETICULATE, tags.WEB, tags.ARK, tags.SOFT_FAIL], }, () => { test.beforeAll(async function ({ app, settings }) { diff --git a/test/e2e/tests/reticulate/reticulate-restart.test.ts b/test/e2e/tests/reticulate/reticulate-restart.test.ts index c728a6717bdd..68903a1ab494 100644 --- a/test/e2e/tests/reticulate/reticulate-restart.test.ts +++ b/test/e2e/tests/reticulate/reticulate-restart.test.ts @@ -14,7 +14,7 @@ test.use({ // RETICULATE_PYTHON // to the installed python path -test.describe.skip('Reticulate', { +test.describe('Reticulate', { tag: [tags.RETICULATE, tags.WEB, tags.SOFT_FAIL], }, () => { test.beforeAll(async function ({ app, settings }) { diff --git a/test/e2e/tests/reticulate/reticulate-stop-start.test.ts b/test/e2e/tests/reticulate/reticulate-stop-start.test.ts index 708828e08505..50f31f3d5411 100644 --- a/test/e2e/tests/reticulate/reticulate-stop-start.test.ts +++ b/test/e2e/tests/reticulate/reticulate-stop-start.test.ts @@ -14,7 +14,7 @@ test.use({ // RETICULATE_PYTHON // to the installed python path -test.describe.skip('Reticulate', { +test.describe('Reticulate', { tag: [tags.RETICULATE, tags.WEB, tags.SOFT_FAIL], }, () => { test.beforeAll(async function ({ app, settings }) { diff --git a/test/e2e/tests/reticulate/reticulate-variables.test.ts b/test/e2e/tests/reticulate/reticulate-variables.test.ts index b394d625d521..f250e2ed380a 100644 --- a/test/e2e/tests/reticulate/reticulate-variables.test.ts +++ b/test/e2e/tests/reticulate/reticulate-variables.test.ts @@ -12,7 +12,7 @@ test.use({ // In order to run this test on Windows, I think we need to set the env var: // RETICULATE_PYTHON to the installed python path -test.describe.skip('Reticulate - Variables pane support', { +test.describe('Reticulate - Variables pane support', { tag: [tags.RETICULATE, tags.WEB, tags.SOFT_FAIL], }, () => { test('R - Verify Reticulate formats variables in the Variables pane', async function ({ app, sessions, logger }) { From 49b583f100259dec3936aed5c13c215080f14e1b Mon Sep 17 00:00:00 2001 From: Daniel Falbel Date: Mon, 5 Jan 2026 18:13:41 -0300 Subject: [PATCH 2/2] Fix reticulate support on linux --- .../posit/positron/positron_ipkernel.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/extensions/positron-python/python_files/posit/positron/positron_ipkernel.py b/extensions/positron-python/python_files/posit/positron/positron_ipkernel.py index 09e8a0e5f6f1..5983e6067e60 100644 --- a/extensions/positron-python/python_files/posit/positron/positron_ipkernel.py +++ b/extensions/positron-python/python_files/posit/positron/positron_ipkernel.py @@ -643,6 +643,24 @@ def _showwarning(self, message, category, filename, lineno, file=None, line=None return original_showwarning(message, category, filename, lineno, file, line) # type: ignore reportAttributeAccessIssue + def pre_handler_hook(self): + # Override the default pre_handler_hook to add debug logging. + # The default logging in Ipykernel adds the exc_info=True which is causing + # huge tracebacks, specially in reticulate sessions - the pre_handler_hook and + # post_handler_hook always fail because they can't signal from a different thread. + # See: https://github.com/posit-dev/positron/issues/10953 + try: + super().pre_handler_hook() + except Exception as e: + self.log.debug("Error in super().pre_handler_hook(): %s", e, exc_info=False) + + def post_handler_hook(self): + # see the pre_handler_hook for details + try: + super().post_handler_hook() + except Exception as e: + self.log.debug("Error in super().post_handler_hook(): %s", e, exc_info=False) + class PositronIPKernelApp(IPKernelApp): control_thread: ControlThread | None