Open
Conversation
LogCapture no longer inherits from logging.Handler. All logging-specific logic moves to LoggingSource (in new capturing.py), which becomes the actual handler. LogCapture owns a list of Entry objects and a collector callback, keeping it decoupled from the logging framework. Public API is unchanged; records becomes a deprecated compatibility property backed by entries.
`ensure_checked` uses this and now also uses `None` instead of `logging.NOTSET` as its sentinel
- Add exception field to Entry, populated by LoggingSource and TwistedSource - Refactor LogCapture to multi-source (_sources list) with sources= constructor param - Add LoggingSource.__repr__ for cleaner warning messages - Add order_matters param to LogCapture.check() - Add raise_first_exception(), check_exception_str(), make() to LogCapture - Add TwistedSource to testfixtures.twisted - Document Entry as public API; update docs/twisted.rst with unified usage section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Removes ~80 lines of duplicated logic (install, uninstall, check, make) - events property exposes raw Twisted events for backward compat - Only keeps check_failure_text and raise_logged_failure (Twisted-specific) - Update 3 order_matters=False tests to match SequenceComparison error format Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
LogCaptureand existingLogCapture