Closed
Description
Steps to reproduce
-
Set up a bot with a MessageQueue as described in the wiki
-
pass a
Defaults
object to the bot
Expected behaviour
Defaults should be used
Actual behaviour
They're not. Instead ValueError("Function has keyword-only parameters or annotations"
is raised
Why this happens & how to overcome
getargspec
is deprecated in favor ofgetfullargspec
. This can easily be resolved- This doesn't suffice yet, as the methods of
MQBot
override the bots methods and are decorated.getfullargspec
can't see through the decorator. usinginspect.getfullargspec(inspect.unwrap(method))
can resolve that - This still only works, if we explicitly list the methods args & kwargs while overriden in
MQBot
After #2012 this is one more reason to tackle MQ in v13.X/v14. Just adding inspect.getfullargspec(inspect.unwrap(method))
as a more or less quick fix doesn't really seem right to me …
Metadata
Metadata
Assignees
Labels
No labels