Skip to content

Release v6.2.10

Latest

Choose a tag to compare

@awolverp awolverp released this 29 Oct 16:17

This is a patch release fixed a critical bug in TTLCache/VTTLCache (popitem() method), and focused on correctness, deadlock avoidance, and internal robustness.

What's Changed

  • All cache methods now detach GIL when waiting for the lock. Follow-up to the #95 deadlock fix. Methods such as __len__, __bool__, clear, popitem, capacity, and the TTL expire helpers now detach GIL before locking (lock_py_attached). (#117)

  • __eq__ / __ne__ lock the two caches in address order. Prevents the classic cross-thread deadlock where one thread does a == b while another does b == a`. (#122)

  • update() no longer runs Python code under the cache lock. For anything other than an exact dict/list/tuple/set/frozenset, the pairs are built outside the lock in 1024-entry chunks so peak memory tracks the cache size, not the input size. (#123)

  • popitem() on TTLCache/VTTLCache now drops expired entries first. It no longer returns an already-expired key. (#121)

  • When a C-level key’s tp_hash or tp_richcompare fails without setting an exception, now cachebox raises SystemError instead of panicing. (#120)

  • The internal linked list implementation now is more safer. linked list stays consistent if an element’s Drop panics. (#124)

  • Documentation corrections. (#119)

Special Thanks to

Full Changelog: v6.2.9...v6.2.10