New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inspect.signature includes bound argument for wrappers around decorated bound methods #74044
Comments
|
If we wrap function with bound method, which is also a wrapper around function, Reproducer: import functools, inspect
def decorator(func):
@functools.wraps(func)
def inner(*args):
return func(*args)
return inner
class Foo(object):
@decorator
def bar(self, testarg):
pass
f = Foo()
baz = decorator(f.bar)
assert inspect.signature(baz) == inspect.signature(f.bar) |
|
Related to http://bugs.python.org/issue24298 |
iritkatriel
pushed a commit
that referenced
this issue
Nov 10, 2022
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 10, 2022
… methods (pythonGH-736) (cherry picked from commit dbf2faf) Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 10, 2022
… methods (pythonGH-736) (cherry picked from commit dbf2faf) Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
ethanfurman
pushed a commit
to ethanfurman/cpython
that referenced
this issue
Nov 12, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
anton-ryzhov mannequin commentedMar 20, 2017
•
edited by bedevere-bot
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: