Whole file

hynek/structlog

The author described this change as fix: use a noop with the same signature as the real one for make_filtering_bound_logger (#401). It counts as a record because the check below fails on the code as it stood at 09f4313ce and passes on 5871e78d4, with nothing else changed between the two runs.

Fix saved2022-03-10
Sharing licenceMIT · LICENSE-MIT
Change size+1 1

What the code was meant to do, written into the code itself as a save note

fix: use a noop with the same signature as the real one for make_filtering_bound_logger (#401)

The change

6767 return event_dict
6868
6969
70-def _nop(*args: Any, **kw: Any) -> Any:
70+def _nop(self: Any, event: str, **kw: Any) -> Any:
7171 return None
7272
7373

The check that tells the two apart

failpass·tests/test_log_levels.py::TestFilteringLogger::test_filter_bound_below_missing_event_string

Check file tests/test_log_levels.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it09f4313ce374af2dad14a506c1a25d808e6f85a9
Broken version dated2022-02-11
Modulestructlog._log_levels
Units changed_nop
Fingerprint2f01eceea9486a99
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in hynek/structlog