-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Deprecate inspect.Signature.from_function and from_builtin #68436
Comments
I want to deprecate Signature.from_function and Signature.from_builtin in 3.5. There is no use for these methods (they aren't generic), and we also now have a very handy 'from_callable' for easy Signature subclassing. |
Forgot to mention: from_function and from_builtin are not documented. |
Patch is attached. |
+1 from me. The deprecation warning text in the patch has a typo (callback instead of callable). For the documentation, in addition to noting the deprecation itself, it may also be worth noting how to explicitly recreate the type restriction. |
Nick, what do you mean by "type restriction"? Also, since the functions aren't documented, I think we don't need to document that they are deprecated? |
Oh, right - you said they weren't documented, and I completely glazed over that bit. The "type restrictions" comment isn't valid in the absence of documentation, but it was basically about how to fully replicate the behaviour of the existing functions in conjunction with "from_callable". |
New changeset 64fba4ea031b by Yury Selivanov in branch 'default': |
OK, committed! Thanks for the review, Nick. |
I documented the deprecation in the whatsnew section anyways. |
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: