-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-114949: fix signature in the type.__prepare__() doc string #114950
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
Conversation
Probably could skip news. Not sure if it worth to add also a regression test. |
What is the problem this solves? On main I see:
Which seems correct. |
I believe the problem described by #114949 (comment) was solved by
On Python 3.12, and on the ~/dev/cpython (d0058cbd1cd) % ./python.exe -c "import inspect; print(inspect.signature(type.__prepare__))"
Traceback (most recent call last):
File "<string>", line 1, in <module>
import inspect; print(inspect.signature(type.__prepare__))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alexw/dev/cpython/Lib/inspect.py", line 3366, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alexw/dev/cpython/Lib/inspect.py", line 3108, in from_callable
return _signature_from_callable(obj, sigcls=cls,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alexw/dev/cpython/Lib/inspect.py", line 2599, in _signature_from_callable
return _signature_from_builtin(sigcls, obj,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alexw/dev/cpython/Lib/inspect.py", line 2398, in _signature_from_builtin
raise ValueError("no signature found for builtin {!r}".format(func))
ValueError: no signature found for builtin <built-in method __prepare__ of type object at 0x100eae0e0> On 1d75ef6 and subsequent commits, we see this:
Although I see you were a reviewer for #112000, @skirpichev, and you filed this PR after that one was merged. So maybe that isn't actually the problem you're describing in #114949 (comment)? |
Indeed, now fixed in the main. I'll close this (and issue). Note, however, that
|
Uh oh!
There was an error while loading. Please reload this page.