mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36974: inherit tp_vectorcall_offset unconditionally (GH-13858) (GH-14342)
(cherry picked from commit a8b27e623d
)
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
This commit is contained in:
parent
20372d6524
commit
26fe6c3537
4 changed files with 18 additions and 7 deletions
|
@ -577,9 +577,18 @@ class TestPEP590(unittest.TestCase):
|
|||
def __call__(self, n):
|
||||
return 'new'
|
||||
|
||||
class SuperBase:
|
||||
def __call__(self, *args):
|
||||
return super().__call__(*args)
|
||||
|
||||
class MethodDescriptorSuper(SuperBase, _testcapi.MethodDescriptorBase):
|
||||
def __call__(self, *args):
|
||||
return super().__call__(*args)
|
||||
|
||||
calls += [
|
||||
(MethodDescriptorHeap(), (0,), {}, True),
|
||||
(MethodDescriptorOverridden(), (0,), {}, 'new'),
|
||||
(MethodDescriptorSuper(), (0,), {}, True),
|
||||
]
|
||||
|
||||
for (func, args, kwargs, expected) in calls:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue