Skip to content

Commit cddcf2a

Browse files
authored
Revert "Cache Manifest files (#787)"
This reverts commit 1971fcf.
1 parent d8d509f commit cddcf2a

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

pyiceberg/table/snapshots.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import time
2020
from collections import defaultdict
2121
from enum import Enum
22-
from functools import lru_cache
2322
from typing import TYPE_CHECKING, Any, DefaultDict, Dict, Iterable, List, Mapping, Optional
2423

2524
from pydantic import Field, PrivateAttr, model_serializer
@@ -231,13 +230,6 @@ def __eq__(self, other: Any) -> bool:
231230
)
232231

233232

234-
@lru_cache
235-
def _manifests(io: FileIO, manifest_list: str) -> List[ManifestFile]:
236-
"""Return the manifests from the manifest list."""
237-
file = io.new_input(manifest_list)
238-
return list(read_manifest_list(file))
239-
240-
241233
class Snapshot(IcebergBaseModel):
242234
snapshot_id: int = Field(alias="snapshot-id")
243235
parent_snapshot_id: Optional[int] = Field(alias="parent-snapshot-id", default=None)
@@ -258,9 +250,9 @@ def __str__(self) -> str:
258250
return result_str
259251

260252
def manifests(self, io: FileIO) -> List[ManifestFile]:
261-
"""Return the manifests for the given snapshot."""
262-
if self.manifest_list:
263-
return _manifests(io, self.manifest_list)
253+
if self.manifest_list is not None:
254+
file = io.new_input(self.manifest_list)
255+
return list(read_manifest_list(file))
264256
return []
265257

266258

0 commit comments

Comments
 (0)