Skip to content

Commit 84558d4

Browse files
Declare CPython's text signature on every method that binds FuncArgs itself
main now reports a __text_signature__ for every generated method, and a method that takes `FuncArgs` to check its own argument count has no Rust parameter list to derive one from, so the 172 builtin methods this branch rewrote that way advertised "(*args, **kwargs)". test_pydoc caught it on str.lower on all three platforms: 'lower(*args, **kwargs) method of builtins.str instance' != 'lower() method of builtins.str instance' Each of them now carries CPython 3.14's own __text_signature__, read from CPython and checked back against it for all 172 (dict.update is left alone: CPython gives it no signature). float.fromhex names its $type the way CPython does. The two pydoc METH_O tests pass with set.add's signature in place, so their expected-failure markers go. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 955a132 commit 84558d4

16 files changed

Lines changed: 173 additions & 175 deletions

File tree

‎Lib/test/test_pydoc/test_pydoc.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,12 +1605,10 @@ def test_bound_builtin_method_noargs(self):
16051605
self.assertEqual(self._get_summary_line(''.lower),
16061606
"lower() method of builtins.str instance")
16071607

1608-
@unittest.expectedFailure # TODO: RUSTPYTHON
16091608
def test_unbound_builtin_method_o(self):
16101609
self.assertEqual(self._get_summary_line(set.add),
16111610
"add(self, object, /) unbound builtins.set method")
16121611

1613-
@unittest.expectedFailure # TODO: RUSTPYTHON
16141612
def test_bound_builtin_method_o(self):
16151613
self.assertEqual(self._get_summary_line(set().add),
16161614
"add(object, /) method of builtins.set instance")

0 commit comments

Comments
 (0)