From 1a211077a43894927545639ef6dbe21b2a821cd4 Mon Sep 17 00:00:00 2001 From: Daker Fernandes Pinheiro Date: Mon, 11 Aug 2025 20:53:35 -0600 Subject: [PATCH] Create Lease id comparison for transactions. --- etcd3/transactions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etcd3/transactions.py b/etcd3/transactions.py index 5603d9b4..1a5bf115 100644 --- a/etcd3/transactions.py +++ b/etcd3/transactions.py @@ -86,6 +86,12 @@ def build_compare(self, compare): compare.mod_revision = int(self.value) +class Lease(BaseCompare): + def build_compare(self, compare): + compare.target = etcdrpc.Compare.LEASE + compare.lease = int(self.value) + + class Put(object): def __init__(self, key, value, lease=None, prev_kv=False): self.key = key