-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Description
Steps to reproduce
-
Set up a bot with a MessageQueue as described in the wiki
-
pass a
Defaultsobject 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
getargspecis deprecated in favor ofgetfullargspec. This can easily be resolved- This doesn't suffice yet, as the methods of
MQBotoverride the bots methods and are decorated.getfullargspeccan'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 …
DemianSDemianS
Metadata
Metadata
Assignees
Labels
No labels