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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2017-06-15.14:44:19.469> created_at = <Date 2017-04-23.20:18:25.285> labels = ['3.7', 'type-bug', 'library'] title = "inspect.signature() doesn't support partialmethod without explicit self parameter" updated_at = <Date 2017-06-15.14:44:19.468> user = 'https://github.com/serhiy-storchaka'
bugs.python.org fields:
activity = <Date 2017-06-15.14:44:19.468> actor = 'serhiy.storchaka' assignee = 'none' closed = True closed_date = <Date 2017-06-15.14:44:19.469> closer = 'serhiy.storchaka' components = ['Library (Lib)'] creation = <Date 2017-04-23.20:18:25.285> creator = 'serhiy.storchaka' dependencies = [] files = [] hgrepos = [] issue_num = 30149 keywords = [] message_count = 5.0 messages = ['292184', '292380', '293877', '296101', '296102'] nosy_count = 5.0 nosy_names = ['rhettinger', 'ncoghlan', 'serhiy.storchaka', 'yselivanov', 'corona10'] pr_nums = ['1308', '1662', '1663'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue30149' versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']
The text was updated successfully, but these errors were encountered:
>>> import functools, inspect >>> class A: ... f = functools.partialmethod((lambda self, x, y, *args: ...), 1) ... >>> inspect.signature(A.f) <Signature (self, y, *args)> >>> class A: ... f = functools.partialmethod((lambda *args: ...), 1) ... >>> inspect.signature(A.f) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/serhiy/py/cpython/Lib/inspect.py", line 3007, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2757, in from_callable follow_wrapper_chains=follow_wrapped) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2227, in _signature_from_callable return sig.replace(parameters=new_params) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2780, in replace return_annotation=return_annotation) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2725, in __init__ raise ValueError(msg) ValueError: duplicate parameter name: 'args'
Sorry, something went wrong.
I submitted the PR for this issue.
New changeset 378d706 by Yury Selivanov (Dong-hee Na) in branch 'master': bpo-30149: Fix partialmethod without explicit self parameter (bpo-1308) 378d706
New changeset e45ea37 by Serhiy Storchaka (Dong-hee Na) in branch '3.6': bpo-30149: Fix partialmethod without explicit self parameter (bpo-1308) (bpo-1662) e45ea37
New changeset fb0825c by Serhiy Storchaka (Dong-hee Na) in branch '3.5': bpo-30149: Fix partialmethod without explicit self parameter (bpo-1308) (bpo-1663) fb0825c
No branches or pull requests
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: