[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-12-11 Thread Roger Serwy
Roger Serwy added the comment: I haven't had any serious problems with calltips on the dev branches for 2.7 and 3.4, except for issue16630. I think this issue can be closed as being completed in order to avoid further expanding its scope. Feel free to reopen if anyone disagrees. -- re

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-07-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The original patches were to all 3 versions. The later patches were to both 3.x versions and mostly involved get_argspec and expanding the tests. Get_argspec is somewhat different from get_arg_text, the 2.x function it replaced. The main difference I could se

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-07-18 Thread Roger Serwy
Roger Serwy added the comment: Are there any other aspects of the calltip handler that requires fixing? If not, then I can start back-porting the patches. -- ___ Python tracker ___

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-07-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for the 'positive lookbehind assertion' for anchoring the match after '('. That is what I was missing. '[^,]' is too broad as, in particular, it matches the ')' in 'a(self)'. We don't want the ')' removed. The tests passed with a faulty re because t

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset eea379307efa by Terry Jan Reedy in branch '3.2': Issue 12510: Delete actual first param name for all methods; revise tests. http://hg.python.org/cpython/rev/eea379307efa New changeset 464c6a50b0ce by Terry Jan Reedy in branch 'default': Merge with

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-12 Thread Roger Serwy
Roger Serwy added the comment: The _self_pat RE needs to be changed to just remove the first argument. Presently, another bug exists with the current implementation: >>> class A: def t(self, self1, self2): pass >>> a = A() >>> a.t( gives "(1,2)" as the

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I decided to commit the current patch (i12510c.test.diff + NEWS changes) as is. Another change is needed to correctly delete the first arg of all methods, not just instance methods with the first arg named 'self'. (In the current new classmethod test, I just

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02b4c62ce393 by Terry Jan Reedy in branch '3.2': Issue #12510: Revise and triple # of calltip tests, with an eye to unittest http://hg.python.org/cpython/rev/02b4c62ce393 New changeset 03b5f75ddac7 by Terry Jan Reedy in branch 'default': Merge from

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: The weird behavior was as if the cursor were moved to the beginning of the line and pressed. I cannot duplicate it. I had elif not isinstance(ob, (types.FunctionType, types.MethodType)): instead elif isinstance(ob.__call__, types.MethodType):

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-05 Thread Roger Serwy
Roger Serwy added the comment: Callable instances now return a call tip. Good! I agree with your analysis of the issue raised by Stephen. The get_argspec function will not fail unexpectedly. > but typing list.append( resulting in weird behavior: something flashed and > the typed text moved d

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Upon further thought, not a problem. Stephen considered the case: class myint(int): # inherit __init__ def added_func(self): "some new function of an int" In this case, fob = myint.__init__ would not be FunctionType and inspect would not be called. Too

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Stephen D'Aprano just asked on Python list how to get signatures of builtins, noting that calling inspect.getargspec on a Python-coded subclass of a builtin class raises an exception. So we need another testcase, verify the behavior, and probably add try-exce

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: By 'Python 3 only', I meant that I am not personally planning to backport to 2.7. I do not want to edit the more complicated get_arg_text and consider other issues higher priority. I meant to include a test case for callable instances, but forgot. When I ad

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-04 Thread Roger Serwy
Roger Serwy added the comment: The reoganization in i12510.test.diff will make back-porting to 2.7 slightly more difficult since old and new style classes exist. I do agree with your reasoning for re-factoring the code. (Also, as an extremely minor point, running reindent.py adjusts "pos = 70

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: i12510.test.diff (for Python 3 only) does the following: * Turn method CallTips.get_entity into a module function as it does not use the self parameter and is therefore not really an instance method. * Delete the erroneous _find_constructor function. Even if

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-03 Thread Roger Serwy
Roger Serwy added the comment: fix_12510.patch addresses the issue with the test. What do you mean by: "int.append( does not bring up a tip on either version, but should if possible." ? The "int" object does not have "append" as a method. -- Added file: http://bugs.python.org/file2581

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: CallTips.py has a 'main' test at the end. Currently, test TC fails in 3.x but not 2.7. So either the test became invalid or get_argspec was not completely and correctly converted from get_arg_text. This should be fixed. int.append( does not bring up a tip on