checkpointer 2.10.0__py3-none-any.whl → 2.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,7 @@ class CachedFunction(Generic[Fn]):
116
116
  return str(ObjectHash(hash_params, digest_size=16))
117
117
 
118
118
  async def _resolve_awaitable(self, call_id: str, awaitable: Awaitable):
119
- return await self.storage.store(call_id, AwaitableValue(await awaitable))
119
+ return self.storage.store(call_id, AwaitableValue(await awaitable)).value
120
120
 
121
121
  def _call(self: CachedFunction[Callable[P, R]], args: tuple, kw: dict, rerun=False) -> R:
122
122
  full_args = self.bound + args
@@ -202,5 +202,7 @@ class ObjectHash:
202
202
  return self.header("slots").update(slots)
203
203
  if d := getattr(obj, "__dict__", {}):
204
204
  return self.header("dict").update(d)
205
+ if isinstance(obj, Iterable):
206
+ return self._update_iterator(obj)
205
207
  repr_str = re.sub(r"\s+(at\s+0x[0-9a-fA-F]+)(>)$", r"\2", repr(obj))
206
208
  return self.header("repr").update(repr_str)
@@ -1,8 +1,6 @@
1
1
  import asyncio
2
2
  import pytest
3
- from riprint import riprint as print
4
- from . import checkpoint
5
- from .checkpoint import CheckpointError
3
+ from . import CheckpointError, checkpoint
6
4
  from .utils import AttrDict
7
5
 
8
6
  def global_multiply(a: int, b: int) -> int:
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: checkpointer
3
- Version: 2.10.0
4
- Summary: A Python library for memoizing function results with support for multiple storage backends, async runtimes, and automatic cache invalidation
3
+ Version: 2.10.1
4
+ Summary: checkpointer adds code-aware caching to Python functions, maintaining correctness and speeding up execution as your code changes.
5
5
  Project-URL: Repository, https://github.com/Reddan/checkpointer.git
6
6
  Author: Hampus Hallman
7
7
  License: Copyright 2018-2025 Hampus Hallman
@@ -1,15 +1,15 @@
1
1
  checkpointer/__init__.py,sha256=FBdEwdyQS2tc4eQMwrb9qsFgjPu9QOyLOqgDK2c1rAI,837
2
- checkpointer/checkpoint.py,sha256=SThQh4cdODw6waf1s3wYhcuHwjAPEmrsUzzsTMpPtow,6827
2
+ checkpointer/checkpoint.py,sha256=yysni7CKzQ2XRX0nvEd34ktNjUcHVZ0CnKMaqQX-f_8,6827
3
3
  checkpointer/fn_ident.py,sha256=hiPvm1lw9Aol6v-d5bjteWdg0VhrPQH4r1Wiow-Wzpo,4311
4
- checkpointer/object_hash.py,sha256=m-GH-hJ7kQ5wOeX8_4eBGdX6gWe8vwuxDt5RP1evoxY,7621
4
+ checkpointer/object_hash.py,sha256=kfyhFFxvcjwkexw5TKkAtCyWU3PZXgsWGJ5dsOaQXmY,7695
5
5
  checkpointer/print_checkpoint.py,sha256=aJCeWMRJiIR3KpyPk_UOKTaD906kArGrmLGQ3LqcVgo,1369
6
- checkpointer/test_checkpointer.py,sha256=GJgM0Cp7V-otr6GDzinmq7lBbm9rngH9CNSqlG1m8VM,3791
6
+ checkpointer/test_checkpointer.py,sha256=mvJu5EItLM95S6IdawgINVgqVCPBNx1bnMHJmwF_cwo,3731
7
7
  checkpointer/utils.py,sha256=_zvbkno7221_4l_FbROJMRrs-enx8BRS4FGxn8et9Ns,2751
8
8
  checkpointer/storages/__init__.py,sha256=en32nTUltpCSgz8RVGS_leIHC1Y1G89IqG1ZqAb6qUo,236
9
9
  checkpointer/storages/memory_storage.py,sha256=Br30b1AyNOcNjjAaDui1mBjDKfhDbu--jV4WmJenzaE,1109
10
10
  checkpointer/storages/pickle_storage.py,sha256=xS96q8TvwxH_TOZsiKmrMrhFwQKZCcaH7XOiECmuwl8,1628
11
11
  checkpointer/storages/storage.py,sha256=dR84h-IN644XLGe7invSlzLuXlFlU8QIbsDZa1xdtPM,889
12
- checkpointer-2.10.0.dist-info/METADATA,sha256=99lN6dxixf5EMhgnN_9Me5iC3BHh9VnzwbwGGzcx1rk,10919
13
- checkpointer-2.10.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- checkpointer-2.10.0.dist-info/licenses/LICENSE,sha256=9xVsdtv_-uSyY9Xl9yujwAPm4-mjcCLeVy-ljwXEWbo,1059
15
- checkpointer-2.10.0.dist-info/RECORD,,
12
+ checkpointer-2.10.1.dist-info/METADATA,sha256=n7eiGDEoqRH-bEncwy27EM108HMwqVLHpDbYGY_PFZk,10908
13
+ checkpointer-2.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ checkpointer-2.10.1.dist-info/licenses/LICENSE,sha256=9xVsdtv_-uSyY9Xl9yujwAPm4-mjcCLeVy-ljwXEWbo,1059
15
+ checkpointer-2.10.1.dist-info/RECORD,,