incorrect hookimpl signature inspection for decorated functions
See original GitHub issuePlease see details at: https://github.com/jaraco/keyring/pull/582#issuecomment-1200450421
Suggestion for pluggy._hooks:varnames
: use inspect.signature(func)
instead of getfullargspec
since it has the ability to follow wrapper chains (and that’s actually the default behavior): https://docs.python.org/3/library/inspect.html#inspect.signature
As can be seen in the mentioned comment above, the current code (pluggy 1.0.0) actually breaks/limits hook-implementations.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Preserving signatures of decorated functions - python
But there is still a problem: the function signature is wrong. The information "*args, **kwargs" is next to useless.
Read more >Issues · pytest-dev/pluggy
incorrect hookimpl signature inspection for decorated functions bug easy help wanted. #358 opened on Jul 31 by eachimei.
Read more >Release 1.0.0
A hook specification (hookspec) is a definition used to validate each hookimpl ensuring that an extension writer has correctly defined their callback function...
Read more >Changelog — pytest documentation
#9272: The nose compatibility module-level fixtures setup() and teardown() are now only called once per module, instead of for each test function. They...
Read more >Incorrect call arguments inspection doesn't work on ...
This behavior is intentional, since a decorator may change the signature of the function in a way that is possible to analyse statically...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the “limit” was never intentional - its primarily a artifact of python 2 support, signature should be used these days
@eachimei the way to contribute in GitHub in general is fork the repository, push your branch there, then open a PR. 👍