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 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 }) {