aboutsummaryrefslogtreecommitdiff
path: root/src/cachetools/ttl.py
diff options
context:
space:
mode:
authorwim glenn <hey@wimglenn.com>2021-09-30 10:14:34 -0500
committerwim glenn <hey@wimglenn.com>2021-09-30 10:14:34 -0500
commitd2297fe1c606d512fc544cf53604ba8ee3c8324b (patch)
tree1a08582d7fba4a93bc5bc6a1b1ed0f1206cd81c7 /src/cachetools/ttl.py
parent8b9bbc4b60429bd73a06ff54a8eefd141215acc2 (diff)
downloadcachetools-d2297fe1c606d512fc544cf53604ba8ee3c8324b.tar.gz
use stacklevel=2 for deprecation warnings, so the source/line number of the user code is indicated
Diffstat (limited to 'src/cachetools/ttl.py')
-rw-r--r--src/cachetools/ttl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cachetools/ttl.py b/src/cachetools/ttl.py
index d96b677..ef343da 100644
--- a/src/cachetools/ttl.py
+++ b/src/cachetools/ttl.py
@@ -3,5 +3,7 @@ import warnings
from . import TTLCache
warnings.warn(
- "cachetools.ttl is deprecated, please use cachetools.TTLCache", DeprecationWarning
+ "cachetools.ttl is deprecated, please use cachetools.TTLCache",
+ DeprecationWarning,
+ stacklevel=2,
)