Repository navigation
Fix: Stop capturing warnings in thread workers - #374
Merged
tlambert03 merged 2 commits intoNov 22, 2026
Merged
Conversation
Workers no longer add an "always" filter or replace warnings.showwarning while they run. Warnings raised in a worker now go through the normal warnings machinery, so the user's filters apply (fixes pyapp-kit#371). The `warned` signal is kept so existing connections don't break, but it is never emitted and accessing it raises a FutureWarning.
This was referenced Nov 18, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #374 +/- ##
==========================================
- Coverage 85.04% 84.90% -0.14%
==========================================
Files 49 49
Lines 3971 3935 -36
==========================================
- Hits 3377 3341 -36
Misses 594 594 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tlambert03
approved these changes
Nov 20, 2026
tlambert03
left a comment
Member
There was a problem hiding this comment.
Good by me @TimMonko! Thanks for following up on this. I'll give this a day or so for anyone else from napari to comment (if you want to ping them), but otherwise fine for merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References and Relevant Issues
Closes #371, follows on #365 and #366
Description
While a worker ran, superqt replaced
warnings.showwarningand added an"always"filter for the whole process, so it could send the warning to the worker'swarnedsignal. #371 found that this results inignorefilters stopped working while a worker is running. Instead of trying to "fix" all this behavior like in #365 and #366, this PR removes the capture entirely.Raised warnings now go through the normal
warnings.showwarningmachienry and a user's fitlers apply.While #371 (comment) describes how this
warnedsignal is probably safe for complete removal, this keeps it as deprecated with aFutureWarningTested additionally that this is satisfactory (for napari) with