bpo-19903: IDLE: Calltips changed to use inspect.signature#2822
Conversation
|
@mlouielu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @terryjreedy, @kbkaiser and @serhiy-storchaka to be potential reviewers. |
Sorry, something went wrong.
|
Louie, I cannot add commits to this issue, and a few others of yours and others. Please follow the instructions at https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/#enabling-repository-maintainer-permissions-on-existing-pull-requests to make sure "Allow edits from maintainers." is checked for this and other IDLE issues. Please let me know what you found. If that is already checked, then I have some other problem with github. |
Sorry, something went wrong.
|
@terryjreedy The check is on now. Hmmm, I thought that is default to check-up? FWIR this has been discussed on python-committers before? |
Sorry, something went wrong.
|
There seems to have been a problem with a robot unchecking the edit switch under some circumstances. Since patched. |
Sorry, something went wrong.
|
I want to make a few minor changes, do some live tests, and merge. But when I tried to make a local PR, git trapped my clone in a loop. |
Sorry, something went wrong.
terryjreedy
left a comment
There was a problem hiding this comment.
I wrote minor changes I planned to write, to make code slightly clearer. The should not affect tests.
PR also needs a blurb added. The title line might be enough. In any case, web edit works well for blurbs.
Sorry, something went wrong.
This commit change the get_argspec from using inspect.getfullargspec to inspect.signature. It will improve the tip message for use. Also, if object is not callable, now will return this message for user, not blank tips. If the methods has an invalid method signature, it will also return message to user.
terryjreedy
left a comment
There was a problem hiding this comment.
I am doing some manual checking while waiting for CI, but expect to merge.
Sorry, something went wrong.
|
Funny you should ask. When 3.6.0b1 came out, I stopped backporting to anything before 3.6: too much work and too much danger of regressions. In testing this, I noticed that ')' no longer closes calltips -- a bad regression since 3.6.2. Since repository 3.6.2+ has the same problem, it is definitely not this patch. I suspect bpo-30723. Of course, there is no test of such behaviors. That aside, this patch would have less effect in 3.5 (pre-Arg Clinic, I believe), and the too dangerousCurrently, everything is backported to 3.6, and only 3.6. The last 3.5 maintenance release candidate was issued a week ago, so it is effectively in security-only mode. |
Sorry, something went wrong.
|
This PR should be block until the regression of not closing tipbox been fixed. I don't think the problem came from #2306, I test it on mac first |
Sorry, something went wrong.
terryjreedy
left a comment
There was a problem hiding this comment.
Requested changes made, some with improvements.
Sorry, something went wrong.
…honGH-2822) Idlelib.calltips.get_argspec now uses inspect.signature instead of inspect.getfullargspec, like help() does. This improves the signature in the call tip in a few different cases, including builtins converted to provide a signature. A message is added if the object is not callable, has an invalid signature, or if it has positional-only parameters. Patch by Louie Lu.. (cherry picked from commit 3b0f620)
…2822) (#3053) Idlelib.calltips.get_argspec now uses inspect.signature instead of inspect.getfullargspec, like help() does. This improves the signature in the call tip in a few different cases, including builtins converted to provide a signature. A message is added if the object is not callable, has an invalid signature, or if it has positional-only parameters. Patch by Louie Lu.. (cherry picked from commit 3b0f620)
This commit change the get_argspec from using inspect.getfullargspec
to inspect.signature. It will improve the tip message for use.
Also, if object is not callable, now will return this message for
user, not blank tips. If the methods has an invalid method signature,
it will also return message to user.
Re-open from #1382
https://bugs.python.org/issue19903