question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

incorrect hookimpl signature inspection for decorated functions

See original GitHub issue

Please 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:open
  • Created a year ago
  • Reactions:2
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
RonnyPfannschmidtcommented, Jul 31, 2022

the “limit” was never intentional - its primarily a artifact of python 2 support, signature should be used these days

1reaction
nicoddemuscommented, Aug 2, 2022

@eachimei the way to contribute in GitHub in general is fork the repository, push your branch there, then open a PR. 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found