pytest-dev/pluggy

incorrect hookimpl signature inspection for decorated functions

eachimei opened this issue ยท 10 comments

Please see details at: jaraco/keyring#582 (comment)

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.

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

0001-proposed-fix-for-issue-358.patch.txt

Attached is a fix proposal (including a matching test) as a git-patch.

Why not open a pr?, this is absolutely horrible to work with from mobile, and it's still quite a pain if I get back to the computer

I'd love to and I actually tried, but seems like I don't have permission to push a branch?

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

You need to create a fork, then push to your fork. From there you can open a PR to this repository.

@nicoddemus

You need to create a fork, then push to your fork. From there you can open a PR to this repository.

Thank you, already done: PR approved but not merged yet: #359

@RonnyPfannschmidt looks like this can be closed as completed.

indeed, thanks