test: patch params_storage on the class so the teardown test survives faststream 0.7.7's __slots__ - #256
Merged
Conversation
… faststream 0.7.7's __slots__
This was referenced Sep 25, 2026
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.
Fixes the scheduled dependency check, red since 2026-09-24 (run 36130214503).
faststream 0.7.7 gave
LoggerState__slots__ = ('log_level', 'logger', 'params_storage').test_faststream_logging_teardown_runs_super_when_broker_write_raisespromoted the instance to a subclass via__class__assignment, which CPython refuses once the layouts differ, so the test errored and coverage fell to 99.87%.The test now uses
monkeypatch.setattr(type(logger), "params_storage", property(fset=...), raising=False). A data descriptor on the class wins over both a slot and an instance__dict__, so the same test works before and after the change, and monkeypatch restores the original descriptor afterwards. No library code changes: the other 330 tests already pass on 0.7.7.Verified: full suite 331 passed at 100% coverage on faststream 0.7.7; the faststream test module also passes on 0.7.6 and on the 0.6.0 floor;
just lint-cigreen.