Skip to content

Releases: cevans87/atools

Fix version specifier for `dataclasses`

18 Apr 00:45
Compare
Choose a tag to compare

Includes a bug fix for python3.8 with pip 23.1. dataclasses version specifier should no longer break during pip install.

Fix expire memo with size and duration

06 May 05:50
Compare
Choose a tag to compare

Enable custom `pickler` for persistent memoization

26 Jun 01:32
Compare
Choose a tag to compare
v0.14.0

Add `pickler` argument to memoize.

Fix accidental removal of HEAD^^ in HEAD^

26 Mar 21:49
Compare
Choose a tag to compare
v0.13.1

Fix accidental removal of HEAD^^ in HEAD^

Add memoize.{update|upsert}

26 Mar 20:31
Compare
Choose a tag to compare

Fix memoize lifetime mishandling NoneType input

22 Mar 05:43
Compare
Choose a tag to compare
v0.12.1

Fix memoize lifetime mishandling NoneType input

Remove `memoize.set_default_db_path` function

20 Mar 23:10
Compare
Choose a tag to compare

Use pickle to memoize to db

16 Mar 20:22
Compare
Choose a tag to compare
Instead of using some complex `str()` and `eval()` logic to serialize
and deserialize python objects, we now use `pickle.{dumps|loads}`. The
pickle module does a good job of getting this right. Our previous logic
did not.

Resolve #45

Bind memo lifetime to arguments that can't be recreated

09 Mar 20:27
Compare
Choose a tag to compare

Arguments that can never be recreated (arguments that use object.__hash__, which bases hash on id()) automatically delete memo when they are garbage collected. So, the following example now runs without issue.

class Foo:
    pass

@memoize
def bar(foo: Foo) -> None:
    pass

foo = Foo()
bar(foo)
assert len(bar.memoize) == 1
del foo
assert len(bar.memoize) == 0

Small bug fixes

21 Jan 04:35
Compare
Choose a tag to compare
  • Memoized functions are now tracked with weakref by this package, so they may be garbage collected.
  • Memoized functions that use a non-default keygen can now be called with default kwargs omitted.