Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/reticulate/reticulate-multiple.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/reticulate/reticulate-repl-python.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/reticulate/reticulate-restart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/reticulate/reticulate-stop-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/reticulate/reticulate-variables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down