• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dgilland / cacheout / 43761843631
100%

Build:
DEFAULT BRANCH: master
Ran 15 Nov 2026 09:07PM UTC
Jobs 5
Files 55
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Nov 2026 09:06PM UTC coverage: 100.0%. Remained the same
43761843631

push

github

dgilland
feat(cache): rework memoize cache keys to avoid collisions

Memoize keys were md5 digests of hash()/repr() values, so distinct
arguments could share a cached result (e.g. -1 and -2, since
hash(-1) == hash(-2) in CPython). Build keys as (func, frozen_args)
tuples instead and let the cache compare them by equality.

- Bind arguments with inspect.signature so omitted defaults, keyword
  vs positional, and **kwargs order normalize to the same key. Set
  aside keywords named like an omitted positional-only parameter,
  which bind() rejects even when **kwargs accepts them.
- Freeze unhashable lists, dicts and sets by value with type tags so
  [1], (1,) and {1} stay distinct, and copy them so later mutation
  can't change a stored key.
- Fall back to identity (holding a strong reference) for other
  unhashable objects.
- Recurse into nested containers when typed=True so (1,) and (1.0,)
  are distinct.
- Add <function>.invalidate() to delete a function's entries, since
  string-pattern filtering no longer applies to memoize keys.
- Type cache_key as returning Hashable.

BREAKING CHANGE: memoize keys are now tuples instead of
"<module>.<name>:<md5>" strings, and cache_key() returns a hashable
value instead of str. Code that filters memoized entries with a
string pattern must use invalidate() or a callable filter. Keys also
now hold references to their arguments until the entry is evicted.

Fixes #59

3060 of 3060 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3.11 - 43761843631.1 15 Nov 2026 09:08PM UTC 11
100.0
GitHub Action Run
2 3.10 - 43761843631.2 15 Nov 2026 09:08PM UTC 11
100.0
GitHub Action Run
3 3.14 - 43761843631.3 15 Nov 2026 09:08PM UTC 11
100.0
GitHub Action Run
4 3.13 - 43761843631.4 15 Nov 2026 09:08PM UTC 11
100.0
GitHub Action Run
5 3.12 - 43761843631.5 15 Nov 2026 09:08PM UTC 11
100.0
GitHub Action Run
Source Files on build 43761843631
  • Tree
  • List 55
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b990a1d5 on github
  • Prev Build on master (#43759260256)
  • Next Build on master (#45047450759)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc