This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年11月28日 19:56 by roger.serwy, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| colorbug.patch | roger.serwy, 2011年11月28日 19:56 | |||
| issue13495.patch | roger.serwy, 2011年12月05日 07:35 | review | ||
| issue13495_rev2.patch | roger.serwy, 2012年01月15日 05:51 | review | ||
| dual_delegators.patch | roger.serwy, 2013年04月20日 02:32 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg148513 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2011年11月28日 19:56 | |
Two instances of ColorDelegator are in the percolator chain. This is a regression from 2.x. The problem can be found in __init__ of EditorWindow in EditorWindow.py. Calling "io.loadfile" eventually calls "filename_change_hook" (See IOBinding.py's "set_filename"). The "filename_change_hook" calls "ResetColorizer" which brings up an instance of ColorDelegator. Then, the self.color reference is overwritten by a new ColorDelegator instance and added to the percolator chain. The attached patch fixes the problem. |
|||
| msg148864 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2011年12月05日 07:35 | |
I attached a better patch that preserves the goals of the original code while not creating two color delegators. I traced down when the regression occurred (2007年09月06日): (a4bd8a4805a8) 1. Fail gracefully if the file fails to decode when loaded. This patch (2008年02月16日) modified parts of the last patch, as well adds "ResetColorizer" to the filename_change_hook. (7c4c46342137) Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,605 |
|||
| msg151278 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年01月15日 05:51 | |
There was another regression introduced by (a4bd8a4805a8). IDLE 3 no longer allows for editing of new files from the command line. For example: idle -e /tmp/newfile.py will momentarily flash an editor window before it is closed. This is due to "good_load" not being set. What's worse is that the IDLE process will continue running without having any visible windows open. The rev2 patch removes the "good_load" flag and fixes the ColorDelegator issue. I understand the purpose of the original code is to avoid displaying a blank editor in case of a decode error. The rev2 patch reintroduces this behavior. In my opinion, that behavior is not a serious problem. |
|||
| msg151280 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年01月15日 06:52 | |
If you are saying that it is better to open a blank window than to not open a filled window, I agree. |
|||
| msg187397 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2013年04月20日 02:32 | |
I will split the "good_load" flag bug into its own issue. While addressing a bug in #5492, another doubled-up ColorDelegator problem appeared, tracing back to #1586. The dual_delagators patch removes the code which loads the extra color delegators as well as ensures that ResetColorizer loads a color delegator since ispythonsource() now always returns True in a PyShell instance. |
|||
| msg188486 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年05月06日 03:15 | |
New changeset fef7f212fe76 by Roger Serwy in branch '3.3': #13495: Avoid loading the color delegator twice in IDLE. http://hg.python.org/cpython/rev/fef7f212fe76 New changeset 588fcf36c975 by Roger Serwy in branch 'default': #13495: merge with 3.3. http://hg.python.org/cpython/rev/588fcf36c975 |
|||
| msg188487 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2013年05月06日 03:16 | |
I'm closing this issue as fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:24 | admin | set | github: 57704 |
| 2013年05月06日 03:16:25 | roger.serwy | set | status: open -> closed resolution: fixed messages: + msg188487 stage: patch review -> resolved |
| 2013年05月06日 03:15:34 | python-dev | set | nosy:
+ python-dev messages: + msg188486 |
| 2013年04月20日 02:32:06 | roger.serwy | set | files:
+ dual_delegators.patch title: IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files. -> IDLE: Regressions - Two ColorDelegator instances loaded versions: + Python 3.4, - Python 3.2 messages: + msg187397 assignee: roger.serwy |
| 2013年04月20日 02:10:49 | roger.serwy | link | issue5492 dependencies |
| 2012年03月20日 21:36:16 | asvetlov | set | nosy:
+ asvetlov |
| 2012年01月15日 06:52:22 | terry.reedy | set | messages:
+ msg151280 stage: patch review |
| 2012年01月15日 05:51:12 | roger.serwy | set | files:
+ issue13495_rev2.patch title: IDLE: Regression - Two ColorDelegator instances loaded -> IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files. nosy: + terry.reedy messages: + msg151278 |
| 2011年12月05日 07:35:39 | roger.serwy | set | files:
+ issue13495.patch nosy: + kbk, christian.heimes, - ned.deily messages: + msg148864 |
| 2011年12月02日 22:26:00 | terry.reedy | set | versions: - Python 3.1 |
| 2011年11月28日 19:56:57 | roger.serwy | create | |