[issue20338] Idle: increase max calltip width

2019-03-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue20338] Idle: increase max calltip width

2014-01-29 Thread Stefan Krah
Stefan Krah added the comment: Terry J. Reedy wrote: > and fixed fixed the first-line deletion somewhere in changes to about 30 > other files. Ah, so it was a Derby accident. Let's hope things stabilize soon. -- ___ Python tracker

[issue20338] Idle: increase max calltip width

2014-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: On 1/28/2014 8:09 AM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > On 1/28/2014 4:48 AM, Stefan Krah wrote: >> >> Stefan Krah added the comment: >> >> I think test_idle is failing on many build slaves following this >> commit. > > The two failu

[issue20338] Idle: increase max calltip width

2014-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: On 1/28/2014 4:48 AM, Stefan Krah wrote: > > Stefan Krah added the comment: > > I think test_idle is failing on many build slaves following this > commit. The two failures I saw on the first 4 3.x bots with Idle failures are the result of changes in the list do

[issue20338] Idle: increase max calltip width

2014-01-28 Thread Stefan Krah
Stefan Krah added the comment: I think test_idle is failing on many build slaves following this commit. -- nosy: +skrah ___ Python tracker ___ ___

[issue20338] Idle: increase max calltip width

2014-01-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Actually, all new-style classes .__new__ and .__init__ from object if not over-ridden. The calltip code depends on the .__init__ inheritance. -- ___ Python tracker ___

[issue20338] Idle: increase max calltip width

2014-01-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I increased indent to 4 spaces and made it easier to change. I believe old-styles classes do not have .__new__, so test of TextWrapper will ensure that they work. Inspect.signature should have correct logic to handle .__new__, with or without .__init__. (I pr

[issue20338] Idle: increase max calltip width

2014-01-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset d960c4cabb2b by Terry Jan Reedy in branch '2.7': Issue #20338: Increase allowed tip width slightly and wrap long signagure lines. http://hg.python.org/cpython/rev/d960c4cabb2b New changeset 7dcc19308a7b by Terry Jan Reedy in branch '3.3': Issue #203

[issue20338] Idle: increase max calltip width

2014-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But I prefer larger indent. Perhaps we need explicit tests for constructors of old- and new-style classes, with __new__, with __init__, and without __new__ and __init__. -- ___ Python tracker

[issue20338] Idle: increase max calltip width

2014-01-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I removed the incorrect * comment. Attached is a 2.7 port of the 3.3 patch. It turns out that textwrap.TextWrap in 2.7 is an old-style class. Such did not work previously because they do not have .__call__ and failed the hasattr() check, now a try:except check

[issue20338] Idle: increase max calltip width

2014-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: textwrap.TextWrapper in 3.3 doesn't have '*' and following parameters. -- ___ Python tracker ___ _

[issue20338] Idle: increase max calltip width

2014-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I changed 5 to _MAX_LINES. Other than trivial duplication, I think each test example should be added for a reason, because there is something different about it that might conceivably cause a failure. For example, there should be a case with more than _MAX_LIN

[issue20338] Idle: increase max calltip width

2014-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And note that currently there is a bug in doc.split('\n', 5)[:_MAX_LINES]. An argument of split() should be _MAX_LINES. -- ___ Python tracker ___

[issue20338] Idle: increase max calltip width

2014-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, do this. I think we should add several test functions with too long signatures and/or docstrings. -- ___ Python tracker ___ __

[issue20338] Idle: increase max calltip width

2014-01-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: 1. For multiple reasons, I want to at least start with only wrapping the signature string. I want to keep the code as simple and fast as possible, and not worry much about rare oddball or PEP8-violating cases. I want to only do what is needed for the purpose

[issue20338] Idle: increase max calltip width

2014-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch (for 3.4) which wraps long lines. Now you can display a tip for textwrap.TextWrapper. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file33632/idle_calltips_wrap.patch ___

[issue20338] Idle: increase max calltip width

2014-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I think we can extend the limit (until implement wrapping). On my narrow monitor there is a room only for 120 character tip (when it starts right from left side of the screen), so I prefer to wrap long lines. In any case too long lines are not comfortab

[issue20338] Idle: increase max calltip width

2014-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: How about we extend the limit from 79 to say 120, to accommodate people who use longer docstring lines, and only wrap the signature line, when present, like the one for HTTPConnection, as the signature is the important information to include. --

[issue20338] Idle: increase max calltip width

2014-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no problem on Linux. I think wrapping will be more preferable. 200 columns looks to wide for tips. Perhaps in 3.4 we can use textwrap.wrap() with the max_lines argument. And left simple truncating in earlier versions. -- __

[issue20338] Idle: increase max calltip width

2014-01-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I deleted truncation code in CallTipWindow.py, all three versions, but messed up issue number. 2.7 http://hg.python.org/cpython/rev/c28e07377b03 changeset: 88630:c28e07377b03 3.3 (same) http://hg.python.org/cpython/rev/1b89fd73c625 changeset: 88631:1b89fd73

[issue20338] Idle: increase max calltip width

2014-01-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: On further thought, I think the best place to truncate lines is in get_argspec, after being split from the docstring and before rejoined. -- ___ Python tracker ___

[issue20338] Idle: increase max calltip width

2014-01-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Meant to mention that wrapping is a possible alternative to truncation, although a limit of say, 200, would make either alternative rare. -- ___ Python tracker ___

[issue20338] Idle: increase max calltip width

2014-01-21 Thread Terry J. Reedy
New submission from Terry J. Reedy: Idle calltips are currently limited to 75 (signature) or 70 (doc line) chars. This is insufficient for some stdlib signatures. Example: >>> from http.client import HTTPConnection >>> import inspect >>> fob=HTTPConnection.__init__ >>> line=inspect.formatargspe