From 3bfd049a0a6ca54fa6ebdf585dc539a27c303ea9 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 16 Aug 2015 15:43:28 +0200 Subject: [PATCH] Don't use inspect.getfullargspec(). It seems to be deprecated in Python 3.5. --- qutebrowser/commands/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py index 5135c07e0..0ee50fbb7 100644 --- a/qutebrowser/commands/command.py +++ b/qutebrowser/commands/command.py @@ -161,7 +161,8 @@ class Command: elif 'self' not in signature.parameters and self._instance is not None: raise TypeError("{} is not a class method, but instance was " "given!".format(self.name[0])) - elif inspect.getfullargspec(self.handler).varkw is not None: + elif any(param.kind == inspect.Parameter.VAR_KEYWORD + for param in signature.parameters.values()): raise TypeError("{}: functions with varkw arguments are not " "supported!".format(self.name[0]))