Skip to content

Release v6.2.2

Choose a tag to compare

@awolverp awolverp released this 01 Aug 13:04
· 88 commits to main since this release

Fixed several bugs related to miss counting, missing await, lock cleanup on exceptions, and cancellation handling.

Bug fixes

  • @cached bugs:

    • With lock=False, misses were never incremented and hits were double-counted. Now they are counted correctly.
    • In the async wrapper, when cachebox__ignore=True and lock was off, the function was not awaited and a coroutine object was returned. Now it is properly awaited.
    • If the cached function raised an exception, the per-key lock was never removed and stayed in memory. It is now cleaned up properly.
    • If a task was cancelled while waiting for the lock, the waiter count stayed high and the lock was never cleaned up. Now it is decremented with try/finally.
    • All exceptions (even BaseException) now go through the same cleanup path (previously only Exceptions was caught).
  • In Frozen class, the check for the underlying cache no longer relies on assert (so it still works with -O flag).

  • Removed an unreachable branch in make_key function.

Full Changelog: v6.2.1...v6.2.2