From e065b6d78ddc1b2710a7916f70b334e9008ba05a Mon Sep 17 00:00:00 2001 From: Andrey Henneberg Date: Sun, 11 Jun 2023 02:38:42 +0700 Subject: [PATCH] Changed the call to inspect.getargspec() to call inspect.signature() because the getargspec() function was removed from the inspect module. --- bottle_sqlite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 bottle_sqlite.py diff --git a/bottle_sqlite.py b/bottle_sqlite.py old mode 100755 new mode 100644 index 7fa0e7b..1607931 --- a/bottle_sqlite.py +++ b/bottle_sqlite.py @@ -111,8 +111,8 @@ def apply(self, callback, route): # Test if the original callback accepts a 'db' keyword. # Ignore it if it does not need a database handle. - argspec = inspect.getargspec(_callback) - if keyword not in argspec.args: + signature = inspect.signature(_callback) + if keyword not in signature.parameters: return callback def wrapper(*args, **kwargs):