Issue 1253: IDLE - Percolator overhaul (original) (raw)

Created on 2007-10-10 02:17 by taleinat, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
IDLE_Percolator.071010.patch taleinat,2007-10-10 02:17 review
Messages (9)
msg56306 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2007-10-10 02:17
The Percolator class has been very hard to figure out, and has been a source of confusion for users wanting to "hack" IDLE. This patch makes Percolator a generally useful class which inherits from Delegator. It also adds a new class, TkTextPercolator, which inherits from Percolator and does all of the Text widget specific stuff. The code has been refactored, cleaned up, and the in-code comments have been improved. UndoDelegator.py, ColorDelegator.py and EditorWindow.py have been updated as needed. Also, the code using ColorDelegator in EditorWindow.py has been slightly modified to work better with the Percolator. I've done some testing (only on WinXP but nothing here is platform specific) and this seems to work without a hitch. This patch is required for the Squeezer and ShellLogger IDLE extensions found on PyPI to be able to co-exist.
msg56308 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-10 03:21
It's been too long since I wrote this code to be able to review, but I'm glad that it still gets some love and attention. Here's to hoping that your patch gets applied.
msg56448 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2007-10-15 16:25
Thanks for the patch, it will definitely be applied once I finish reviewing it! Good job splitting off TkTextPercolator and inheriting from Delegator.
msg56653 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2007-10-22 18:08
What change was required to allow Squeezer and ShellLogger to co-exist?
msg56680 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2007-10-23 13:49
The change required for Squeezer and ShellLogger is the separation of the Tk Text specific logic into a subclass, which makes Percolator a generally useful class. Along with the simple patch to Delegator.py which allows delegation to callables, this change allows one to replace a method with a Percolator instance. I want to do this for EditorWindow.write, since both Squeezer and ShellLogger need to hook onto this call somehow. Furthermore, ShellLogger must catch this call before Squeezer does, since Squeezer may change the output, but the original output should pass through ShellLogger first. Since there is no way to control the order in which extensions are loaded, this constraint must be enforced by the extensions themselves. Using the patched Percolator is the simplest way I could come up with to support this. (IMHO adding a constraint solver for extensions at this point would be overkill.)
msg111026 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2010-07-21 09:26
Note that at one point discussion of this issue was continued on the tracker page for .
msg210212 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2014-02-04 12:02
This should be closed as "wont fix".
msg220199 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-10 21:48
Can somebody please close as requested in , thanks.
msg220215 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-06-10 23:47
Tal could have. Anyway, I made a note to look at this or #1252 if I want to understand Percolator or Delegator or think about changing them.
History
Date User Action Args
2022-04-11 14:56:27 admin set github: 45594
2014-06-10 23:47:16 terry.reedy set status: open -> closedresolution: wont fixmessages: +
2014-06-10 21:48:12 BreamoreBoy set nosy: + BreamoreBoymessages: +
2014-02-04 12:02:37 taleinat set nosy: + taleinatmessages: +
2014-02-04 12:01:43 taleinat set nosy: - taleinat
2013-06-15 18:29:57 terry.reedy set assignee: kbk -> versions: + Python 3.3, Python 3.4, - Python 3.1, Python 3.2
2012-03-25 21:35:36 asvetlov set nosy: + asvetlov
2010-07-21 09:26:45 taleinat set messages: +
2010-07-21 02:41:11 BreamoreBoy set nosy: + terry.reedy, - gvanrossumversions: + Python 3.2, - Python 2.6
2009-04-26 22:25:33 ajaksu2 set nosy: + gpoloversions: + Python 3.1, Python 2.7, - Python 2.5stage: patch review
2007-10-23 13:49:33 taleinat set messages: +
2007-10-22 18:08:36 kbk set messages: +
2007-10-15 16:25:32 kbk set priority: normalassignee: kbkmessages: +
2007-10-10 06:03:12 loewis set keywords: + patch
2007-10-10 03:21:52 gvanrossum set nosy: + gvanrossummessages: +
2007-10-10 02:17:04 taleinat create