Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log serialization warning when a panel errors. #1810

Merged

Conversation

tim-schilling
Copy link
Contributor

This will help third party panels identify issues with serializing the content of their panels in the future, without causing the entire toolbar to break.

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

Copy link
Member

@matthiask matthiask left a comment

Choose a reason for hiding this comment

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

Sorry for the bikeshedding. I thought the SERIALIZATION_WARNINGS switch would switch on warnings which would otherwise pass silently, but what it does is warn instead of raise exceptions.

I wonder if "SUPPRESS_SERIALIZATION_ERRORS": True wouldn't be a better name (after contextlib.suppress) but people should RTFM anyway so I think I'm fine with the name you choosed.

debug_toolbar/store.py Outdated Show resolved Hide resolved
@tim-schilling
Copy link
Contributor Author

SUPPRESS_SERIALIZATION_ERRORS is a better name. Let's go with that, even if this is temporary.

This will help third party panels identify issues with serializing
the content of their panels in the future, without causing the
entire toolbar to break.
@tim-schilling tim-schilling merged commit 487dfb3 into jazzband:serializable Aug 21, 2023
21 checks passed
@tim-schilling tim-schilling deleted the serialization-warnings branch August 21, 2023 02:21
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.

2 participants