Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
bpo-1529353: IDLE: squeeze large output in the shell#7626
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Lib/idlelib/editor.py Outdated
[fname, None], | ||
['.' + fname.lower(), __package__], | ||
[fname.lower(), None], | ||
]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Given that the code you are expending worked fine, what is the point of this? It apears to be extraneous to adding squeezer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
If you email a response, please clip the quote.
In 3.6, I made all idlelib file names lower case and broke ext filename == section name.
In compensation, I added a mappingextfiles = { # Map built-in config-extension section names to file names. ...
beforedef load_extension(self, name):
and a new first line: fname = self.extfiles.get(name, name)
that also works with added non-built-in extensions with filename == section-name,
This patch should add a line to the map: 'Squeezer': 'squeezer',
and leave load_extension alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is required to avoid naming the fileSqueezer
(note the capitalization). It won't be needed if we rework this to not use the extensions mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the clarification@terryjreedy!
I think this won't be needed anyways, but if we keep it as an extension I'll make the change you described.
# Conflicts:#Lib/idlelib/tooltip.py
9564154
to9f6dc5f
CompareI pulled and has no merge problem with repository updated 12 hours ago, contrary to Appveyor merge failure. There does not seem to be a way to tell Appveyor and only Appveyor to try again, so lets wait until another push. 'View' better than 'Preview'. Popup looks good. 50 lines seems sensible default, but Refinement: box colors. 'Light' box looks good on dark theme. I would like the box to indicate the type of text squeezed, with error color dominating normal color. So pink background for traceback and bluish for no error. I will experiment with what I like with 'normal' light theme. This might be left to a followup. Options should take effect on Ok/Apply and not require restart. This should be easy, but perhaps needs better documentation in configdialog.py. If you work on this, post a note, as will I. I would like just one option line, for trigger condition or conditions (if we add 'characters'). Why would anyone want an invisible button? I think we can pick a popup time that appears nearly instant but skips popup if swipe cursur over 'quickly'. 80 ms seems about right. I intend to look at code and issue questions tomorrow. |
They do, except that existing expanding buttons don't have their tooltip config updated. I've looked into this and getting it working properly is surprisingly complex. Perhaps we can just do away with the two tooltip config opitons (whether to show at all and how long to delay before showing)? Otherwise I'll get it working. |
Note that there is already a definition for "error" colors, we might consider using those (or just the background). FWIW I find the existing colors satisfactory in both the light and dark themes. The default colors (black text on a light-gray background) are also okay IMO. If we use something else, I think we should make the colors configurable, so that users can match them to their configuration. |
Resolve conflict in textview.py.
I resolved the merge conflict, with the following as the merged text.
I verified that changing min lines takes immediate effect. Everything else seems the same. I never see a horizontal scrollbar, so maybe there is a bug there. I don't consider this essential. 100 char lines in a standard or narrowed window do not trigger a scrollbar. Instead, lines wrap. The text window works fine for the About IDLE displays, including with user colors. |
FAIL: test_nowrap (idlelib.idle_test.test_textview.ViewFunctionTest)Traceback (most recent call last):
This can be fixed by changing or skipping the test, but perhaps this is why I see wrapping instead of a scrollbar. I am looking at the test and code. |
view_test passes wrap to ViewWindow to ViewFrame to TextFrame but not to Text because my merge resolution did not merge the Text call. Fixing now. |
With the fixes,
This is because when test_idle is run as main, tk.NoDefaultRoot() is called first. Serhiy Storchaka recommended that IDLE should not use the default root mechanism, because it has problems, and test that it does not. The call used to be in the main body, so tests could never use default root. But then this caused another issue with other tests, and I moved it into the if-main clause. When I run just the squeezer tests from squeezer.py or test_squeezer.py, the tests pass, but a blank tk window is left over. I am a little surprised that we don't get a warning from the CI bot, as not destroying root as part of teardown has previously caused order-dependent problems when IDLE tests are run as part of the Pyhton test suite. Maybe some non-CI buildbots are stricter. Given both these issues, I would rather wait to merge until these are fixed. I both know how and am willing to do so. Docstring sentences should start with Caps and end with periods. (PEP8). Up to now, IDLE test classes have used SomethingTest (noun) rather than TestSomething, leaving the test_something verb for for methods. Do you have a strong preference for verb-form class names? |
Fixed in latest commit. |
Done.
Changed. |
Thanks@taleinat for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
(cherry picked from commit604e7b9)Co-authored-by: Tal Einat <taleinat+github@gmail.com>
bedevere-bot commentedSep 25, 2018
GH-9561 is a backport of this pull request to the3.7 branch. |
(cherry picked from commit604e7b9)Co-authored-by: Tal Einat <taleinat+github@gmail.com>
bedevere-bot commentedSep 25, 2018
GH-9562 is a backport of this pull request to the3.6 branch. |
(cherry picked from commit604e7b9)Co-authored-by: Tal Einat <taleinat+github@gmail.com>
(cherry picked from commit604e7b9)Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
https://bugs.python.org/issue1529353