jayceslesar commented on code in PR #2430:
URL: https://github.com/apache/iceberg-python/pull/2430#discussion_r2331522547


##########
pyiceberg/table/update/snapshot.py:
##########
@@ -924,9 +924,12 @@ class 
ExpireSnapshots(UpdateTableMetadata["ExpireSnapshots"]):
     Pending changes are applied on commit.
     """
 
-    _snapshot_ids_to_expire: Set[int] = set()
-    _updates: Tuple[TableUpdate, ...] = ()
-    _requirements: Tuple[TableRequirement, ...] = ()
+    def __init__(self, transaction: Transaction) -> None:
+        super().__init__(transaction)
+        # Initialize instance-level attributes to avoid sharing state between 
instances
+        self._snapshot_ids_to_expire: Set[int] = set()
+        self._updates: Tuple[TableUpdate, ...] = ()
+        self._requirements: Tuple[TableRequirement, ...] = ()

Review Comment:
   💯



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to