Issue24248
Created on 2015-05-20 18:33 by yselivanov, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| sig_warns.patch | yselivanov, 2015-05-20 21:03 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg243684 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2015-05-20 18:33 | |
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. |
|||
| msg243685 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2015-05-20 18:40 | |
Forgot to mention: from_function and from_builtin are not documented. |
|||
| msg243695 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2015-05-20 21:03 | |
Patch is attached. |
|||
| msg243711 - (view) | Author: Alyssa Coghlan (ncoghlan) * | Date: 2015-05-21 01:31 | |
+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. |
|||
| msg243712 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2015-05-21 01:33 | |
> 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? |
|||
| msg243717 - (view) | Author: Alyssa Coghlan (ncoghlan) * | Date: 2015-05-21 03:07 | |
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". |
|||
| msg243718 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-05-21 03:08 | |
New changeset 64fba4ea031b by Yury Selivanov in branch 'default': Issue 24248: Deprecate inspect.Signature.from_function and .from_builtin https://hg.python.org/cpython/rev/64fba4ea031b |
|||
| msg243719 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2015-05-21 03:09 | |
OK, committed! Thanks for the review, Nick. |
|||
| msg243721 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2015-05-21 03:11 | |
I documented the deprecation in the whatsnew section anyways. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:17 | admin | set | github: 68436 |
| 2015-05-21 03:11:08 | yselivanov | set | messages: + msg243721 |
| 2015-05-21 03:09:25 | yselivanov | set | status: open -> closed resolution: fixed stage: resolved |
| 2015-05-21 03:09:09 | yselivanov | set | messages: + msg243719 |
| 2015-05-21 03:08:14 | python-dev | set | nosy:
+ python-dev messages: + msg243718 |
| 2015-05-21 03:07:27 | ncoghlan | set | messages: + msg243717 |
| 2015-05-21 01:33:33 | yselivanov | set | messages: + msg243712 |
| 2015-05-21 01:31:20 | ncoghlan | set | messages: + msg243711 |
| 2015-05-20 21:03:02 | yselivanov | set | files:
+ sig_warns.patch keywords: + patch messages: + msg243695 |
| 2015-05-20 18:40:18 | yselivanov | set | messages: + msg243685 |
| 2015-05-20 18:33:34 | yselivanov | create | |