Whole file
bharel/asynciolimiter
The author described this change as “Fix: LeakyBucket will now schedule tasks correctly after fully emptying (#20)”. It counts as a record because the check below fails on the code as it stood at 8d2fd8c07 and passes on 68ac31d66, with nothing else changed between the two runs.
Projectbharel/asynciolimiter
Fix saved2025-03-17
Sharing licenceMIT · LICENSE
Change size+1 −0
What the code was meant to do, written into the code itself as a save note
Fix: LeakyBucket will now schedule tasks correctly after fully emptying (#20)
The change
| 574 | 574 | self._locked = False | |
| 575 | 575 | self._level = level | |
| 576 | 576 | if level == 0: | |
| 577 | + | self._wakeup_handle = None # GH-17. | |
| 577 | 578 | return | |
| 578 | 579 | ||
| 579 | 580 | time_to_next_drain = self._time_between_calls - leftover_time |
The check that tells the two apart
fail→pass·tests/test_limiter.py::LeakyBucketLimiterTestCase::test_gh17
Check file tests/test_limiter.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 it8d2fd8c0772cd95cef8426b573c1952a265e8b1c
Broken version dated2024-12-16
Moduleasynciolimiter.__init__
Units changedLeakyBucketLimiter
Fingerprint2c67e516ee2a7182
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.