Skip to content

fix: only surface nested repr_mimebundle NotImplementedError#15168

Open
Maa-ly wants to merge 2 commits into
ipython:mainfrom
Maa-ly:fix/repr-mimebundle-notimplemented
Open

fix: only surface nested repr_mimebundle NotImplementedError#15168
Maa-ly wants to merge 2 commits into
ipython:mainfrom
Maa-ly:fix/repr-mimebundle-notimplemented

Conversation

@Maa-ly

@Maa-ly Maa-ly commented Mar 26, 2026

Copy link
Copy Markdown

Closes #15154

Summary

  • keep swallowing direct NotImplementedError opt-outs from repr methods so interactive fallbacks keep working
  • surface nested _repr_mimebundle_ NotImplementedErrors from helper code instead of silently discarding them
  • add regression tests covering both the direct opt-out path and the nested helper-error path

Validation

  • source .venv/bin/activate && pytest tests/test_formatters.py -q

@Carreau Carreau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 in principle (reviewing from my phone) i need to check and think about reaching for the global ipython instance.

@Maa-ly Maa-ly changed the title fix: show repr_mimebundle NotImplementedError tracebacks fix: only surface nested repr_mimebundle NotImplementedError May 7, 2026
@Maa-ly

Maa-ly commented May 7, 2026

Copy link
Copy Markdown
Author

The previous version made every _repr_mimebundle_ NotImplementedError visible, which is what broke the downstream pyflyby debugger test. This update narrows the change to nested helper errors only, while preserving the long-standing direct opt-out path that interactive fallbacks rely on.

Local validation: source .venv/bin/activate && pytest tests/test_formatters.py -q.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_repr_mimebundle_ ignores NotImplementedError

2 participants