From 5db5a5930a1978a1db649c3407dc3ca32cfb3282 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Mon, 17 Jun 2019 15:04:45 +0000 Subject: [PATCH] Remove __enter__ and __exit__ methods from Enforcer Originally, we wanted oslo.limit's Enforcer object to be a context manager to make it easier to abstract logic to protect against resource race conditions. Since verification logic isn't going to be implemented right away, we can just focus on a single method for enforcement instead, making it easier to adopt. Subsequent patches are going to introduce a new enforcement interface for oslo.limit. Change-Id: I3a1e58cb18a498bca67f36c76d8e8c8c4fb80083 --- oslo_limit/limit.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/oslo_limit/limit.py b/oslo_limit/limit.py index 377c25c..a8445c0 100644 --- a/oslo_limit/limit.py +++ b/oslo_limit/limit.py @@ -37,9 +37,3 @@ class Enforcer(object): self.deltas = deltas self.callback = callback - - def __enter__(self): - pass - - def __exit__(self, *args): - pass