Whole file
fabfuel/circuitbreaker
The author described this change as “fix TypeError raised when calling str(cb) on unnamed CircuitBreaker”. It counts as a record because the check below fails on the code as it stood at 646651337 and passes on 050a32023, with nothing else changed between the two runs.
Projectfabfuel/circuitbreaker
Fix saved2025-03-29
Sharing licenceBSD-3-Clause · LICENSE.rst
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
fix TypeError raised when calling str(cb) on unnamed CircuitBreaker
The change
| 281 | 281 | return self._fallback_function | |
| 282 | 282 | ||
| 283 | 283 | def __str__(self, *args, **kwargs): | |
| 284 | - | return self._name | |
| 284 | + | return self.name or 'unnamed_CircuitBreaker' | |
| 285 | 285 | ||
| 286 | 286 | ||
| 287 | 287 | class CircuitBreakerError(Exception): |
The check that tells the two apart
fail→pass·tests/test_unit.py::test_circuitbreaker_unnamed__str__
Check file tests/test_unit.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 it646651337a3034062b2cf4889e2090c1ba19b61c
Broken version dated2025-03-12
Modulecircuitbreaker
Units changedCircuitBreaker
Fingerprint5928ff2056a50234
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.