From tjreedy at udel.edu Sat Oct 2 19:40:24 2010 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 02 Oct 2010 13:40:24 -0400 Subject: [Idle-dev] IDLE Tiled In-Reply-To: <4C9D8D0F.2000508@ameritech.net> References: <4C9B967C.7080600@ameritech.net> <4C9D3D09.3070909@ameritech.net> <4C9D8D0F.2000508@ameritech.net> Message-ID: On 9/25/2010 1:47 AM, Patrick Gallot wrote: > Hello, > Below are some screen shots of IDLE using different ttk themes (on > windows XP). > > Attached is a version 2.7 of IDLE modified to use ttk (Tiled TK) now > included with Python 2.7. A mailing list is where code goes to die ;-). If you are proposing a patch (for 3.2+), search the tracker for an open issue on the subject IDLE + tile (I believe there is one, with an existing patch) and upload a diff against the IDLE in the py3k branch (or that distributed with the latest 3.2alpha) an an alternative patch. If there is no such issue, open one. If you are proposing an alternate version for public use, start a project on PyPI and upload it there, and upload subsequent versions as you improve it. The IDLE version distributed with 2.7 will only get bug fixes, if that. The IDLE distributed with 3.2 could be upgraded. The main issue is that some Linux distribution have not upgraded tdl/tk from 8.4 to 8.5 (with ttk). The question then is whether it is OK for IDLE require either 8.5 (with ttk) or separate upload of the tile extension. My opinion is yes. But I am dubious that this will happen before 3.2 goes in beta phase (bugfix patches only). -- Terry Jan Reedy From taleinat at gmail.com Mon Oct 4 15:31:51 2010 From: taleinat at gmail.com (Tal Einat) Date: Mon, 4 Oct 2010 15:31:51 +0200 Subject: [Idle-dev] IDLE Tiled In-Reply-To: References: <4C9B967C.7080600@ameritech.net> <4C9D3D09.3070909@ameritech.net> <4C9D8D0F.2000508@ameritech.net> Message-ID: On Sat, Oct 2, 2010 at 7:40 PM, Terry Reedy wrote: > The IDLE version distributed with 2.7 will only get bug fixes, if that. The > IDLE distributed with 3.2 could be upgraded. The main issue is that some > Linux distribution have not upgraded tdl/tk from 8.4 to 8.5 (with ttk). The > question then is whether it is OK for IDLE require either 8.5 (with ttk) or > separate upload of the tile extension. My opinion is yes. But I am dubious > that this will happen before 3.2 goes in beta phase (bugfix patches only). > Perhaps we should aim for Python 3.3 and push for that version to require version 8.5 of tcl/tk? Has requiring version 8.5 been discussed already (perhaps on Python-dev)? - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Mon Oct 4 16:34:29 2010 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 04 Oct 2010 14:34:29 +0000 (GMT) Subject: [Idle-dev] IDLE Tiled In-Reply-To: Message-ID: On 04 Oct, 2010,at 03:32 PM, Tal Einat wrote: On Sat, Oct 2, 2010 at 7:40 PM, Terry Reedy wrote: The IDLE version distributed with 2.7 will only get bug fixes, if that. The IDLE distributed with 3.2 could be upgraded. The main issue is that some Linux distribution have not upgraded tdl/tk from 8.4 to 8.5 (with ttk). The question then is whether it is OK for IDLE require either 8.5 (with ttk) or separate upload of the tile extension. My opinion is yes. But I am dubious that this will happen before 3.2 goes in beta phase (bugfix patches only). Perhaps we should aim for Python 3.3 and push for that version to require version 8.5 of tcl/tk? Has requiring version 8.5 been discussed already (perhaps on Python-dev)? ? There is another issue w.r.t requiring Tk 8.5: OSX 10.5 and earlier ship with Tcl/Tk 8.4, Tk 8.5 support is only included in OSX 10.6. The binary installers for OSX do not include a copy of Tk to keep the size down, these installers too large enough as it is. ?I don't know if it is possible to use ttk with Tcl/Tk 84, if it is I wouldn't mind shipping ttk as part of the binary installers on OSX.? Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: From taleinat at gmail.com Mon Oct 4 21:18:09 2010 From: taleinat at gmail.com (Tal Einat) Date: Mon, 4 Oct 2010 21:18:09 +0200 Subject: [Idle-dev] IDLE Tiled In-Reply-To: References: Message-ID: On Mon, Oct 4, 2010 at 4:34 PM, Ronald Oussoren wrote: > > > On 04 Oct, 2010,at 03:32 PM, Tal Einat wrote: > > On Sat, Oct 2, 2010 at 7:40 PM, Terry Reedy wrote: > >> The IDLE version distributed with 2.7 will only get bug fixes, if that. >> The IDLE distributed with 3.2 could be upgraded. The main issue is that some >> Linux distribution have not upgraded tdl/tk from 8.4 to 8.5 (with ttk). The >> question then is whether it is OK for IDLE require either 8.5 (with ttk) or >> separate upload of the tile extension. My opinion is yes. But I am dubious >> that this will happen before 3.2 goes in beta phase (bugfix patches only). >> > > Perhaps we should aim for Python 3.3 and push for that version to require > version 8.5 of tcl/tk? Has requiring version 8.5 been discussed already > (perhaps on Python-dev)? > > > > There is another issue w.r.t. requiring Tk 8.5: OSX 10.5 and earlier ship > with Tcl/Tk 8.4, Tk 8.5 support is only included in OSX 10.6. > > The binary installers for OSX do not include a copy of Tk to keep the size > down, these installers too large enough as it is. I don't know if it is > possible to use ttk with Tcl/Tk 8.4, if it is I wouldn't mind shipping ttk > as part of the binary installers on OSX. > > Ronald > +1 that the OSX binary should include tcl/tk 8.5 so that Tkinter and IDLE can work out of the box, regardless of what is otherwise installed. That's how it works on Windows and I can't think of a reason for this to be different on OSX. I'm pretty sure have things just work trumps making the binary installer smaller. Anyone who wants to install Python otherwise (e.g. compile from source or use aptitude/macports/etc.) will have deal with dependencies, and Python should require tcl/tk 8.5 from 3.3 onwards. This dependency should be stated explicitly where appropriate. - Tal -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Tue Oct 5 05:44:28 2010 From: tjreedy at udel.edu (Terry Reedy) Date: Mon, 04 Oct 2010 23:44:28 -0400 Subject: [Idle-dev] IDLE Tiled In-Reply-To: References: Message-ID: On 10/4/2010 3:18 PM, Tal Einat wrote: > +1 that the OSX binary should include tcl/tk 8.5 so that Tkinter and > IDLE can work out of the box, regardless of what is otherwise installed. > That's how it works on Windows and I can't think of a reason for this to > be different on OSX. I'm pretty sure have things just work trumps making > the binary installer smaller. > > Anyone who wants to install Python otherwise (e.g. compile from source > or use aptitude/macports/etc.) will have deal with dependencies, and > Python should require tcl/tk 8.5 from 3.3 onwards. This dependency > should be stated explicitly where appropriate. While I would be happy if someone else polished up IDLE in the next couple of months, during the 3.2alpha (new feature) period, I will not be able contribute much at present. So I am personally targeting 3.3 for anything that I substantially help with. One of the first things I would like to do is review the bug reports and feature requests and develop here an overall plan. I anticipate that part of such a plan would be using the themed widgets. They are part of the stdlib and I do not think we should be prohibited from using stdlib modules just because some distributors fail to enable them. Such a plan could also include instructions on how to install tile with tcl/tk 8.4 if it seems that that would still be needed when 3.3 comes out. The ttk use issue was discussed as part of the IDLE future discussion of a couple of months ago (that Tal initiated). I think most comments on pydev were in neutral to favorable, though there was no definitive decision or conclusion. Given agreement here and a plan, I would be willing to announce such on pydev. -- Terry Jan Reedy From basherwo at ncsu.edu Sun Oct 10 23:40:35 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Sun, 10 Oct 2010 15:40:35 -0600 Subject: [Idle-dev] How does one offer patches? Message-ID: Please forgive me for my ignorance, but how does one offer patches to IDLE? At http://vpython.org/vidle/patch.diff is a patch from the idlelib installed with Windows Python3.1.2 to vidle, where vidle incorporates the work done in the 2009 GSoC by Guilherme Polo, updated for Python 3. For details, see my posts of Sept. 14. I have several questions: 1) Is the idlelib shipped with Windows Python 3.1.2 the right base to diff against? 2) If not, against what base should I make the diff? 3) Is one diff for all of idlelib okay, or does one submit separate diff files for each file? 4) How/where do I formally offer this diff? I've never done this before. I should add that just today I remade the diff at http://vpython.org/vidle/patch.diff because I discovered that I'd missed an important correction Guilherme had made. The error is present in the Python 3.1.2 idlelib. In IOBinding.py one should delete this statement: self.text.see("insert") Unless this statement is deleted, when you open a long file the first line is not seen; it's above the edit display. This can be pretty confusing. Bruce Sherwood From basherwo at ncsu.edu Mon Oct 11 01:04:53 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Sun, 10 Oct 2010 17:04:53 -0600 Subject: [Idle-dev] How does one offer patches? In-Reply-To: References: Message-ID: Hmm. The "missing top line" problem is seen on Windows. I find that whether the statement is present or not in IOBinding.py makes no difference on the Mac. Bruce Sherwood On Sun, Oct 10, 2010 at 3:40 PM, Bruce Sherwood wrote: > > I should add that just today I remade the diff at > http://vpython.org/vidle/patch.diff because I discovered that I'd > missed an important correction Guilherme had made. The error is > present in the Python 3.1.2 idlelib. In IOBinding.py one should delete > this statement: > > ? ? self.text.see("insert") > > Unless this statement is deleted, when you open a long file the first > line is not seen; it's above the edit display. This can be pretty > confusing. From basherwo at ncsu.edu Mon Oct 11 01:14:59 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Sun, 10 Oct 2010 17:14:59 -0600 Subject: [Idle-dev] How does one offer patches? In-Reply-To: References: Message-ID: Nor does it matter on (Ubuntu) Linux. It only seems to matter on Windows. Bruce Sherwood On Sun, Oct 10, 2010 at 5:04 PM, Bruce Sherwood wrote: > Hmm. The "missing top line" problem is seen on Windows. I find that > whether the statement is present or not in IOBinding.py makes no > difference on the Mac. From taleinat at gmail.com Mon Oct 11 02:19:16 2010 From: taleinat at gmail.com (Tal Einat) Date: Mon, 11 Oct 2010 02:19:16 +0200 Subject: [Idle-dev] How does one offer patches? In-Reply-To: References: Message-ID: Bruce Sherwood wrote: > Please forgive me for my ignorance, but how does one offer patches to > IDLE? At http://vpython.org/vidle/patch.diff is a patch from the > idlelib installed with Windows Python3.1.2 to vidle, where vidle > incorporates the work done in the 2009 GSoC by Guilherme Polo, updated > for Python 3. For details, see my posts of Sept. 14. > > I have several questions: > > 1) Is the idlelib shipped with Windows Python 3.1.2 the right base to > diff against? > > 2) If not, against what base should I make the diff? > > 3) Is one diff for all of idlelib okay, or does one submit separate > diff files for each file? > > 4) How/where do I formally offer this diff? I've never done this before. > > I should add that just today I remade the diff at > http://vpython.org/vidle/patch.diff because I discovered that I'd > missed an important correction Guilherme had made. The error is > present in the Python 3.1.2 idlelib. In IOBinding.py one should delete > this statement: > > ? ? self.text.see("insert") > > Unless this statement is deleted, when you open a long file the first > line is not seen; it's above the edit display. This can be pretty > confusing. Since IDLE is part of the Python stdlib, patches (and bugs and features requests) should be posted on the Python bug tracker at bugs.python.org. For major patches such as this, a mention on the idle-dev mailing list is also helpful to get things moving along. A patch should contain all relevant changes to all relevant files. Ideally, a patch should encapsulate a single set of changes, and after applying it everything should still work as expected. If several unrelated changes have been made in VIDLE, it might be better to post a patch for each change separately to make testing and reviewing simpler. This can take a bit of work though, and it's better to post one big patch than to post nothing at all. Patches should preferably be based on a recent SVN revision. The more recent the better, but next point is more important... Patches should only be posted after having been well tested in order to avoid frustrating the reviewers. From my experience, posting a patch and later mentioning small fixes and edge-cases will often cause a patch not to be accepted, because nobody will want to review it. Posting a patch and requesting help in fixing a few last problems is okay, of course, as long as you've recognized the problems and mention them in advance. I hope this helps! I'm itching to get Guilhereme's changes in! - Tal Einat From basherwo at ncsu.edu Mon Oct 11 04:44:55 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Sun, 10 Oct 2010 20:44:55 -0600 Subject: [Idle-dev] How does one offer patches? In-Reply-To: References: Message-ID: Thanks much, Tal. There has already been extensive testing of VIDLE. Guilherme's GSoC version was distributed under the name of VIDLE with VPython 2.6 or 2.7 during the past year with no hint of problems. As part of getting VPython to work with Python 3 I manually applied Guilherme's patches to the Python 3 idlelib to make a Python 3 VIDLE and the diff patch. I've been using Python 3 with VPython and VIDLE for several weeks on Windows with no problems, and I've used VIDLE a little on a Mac. However, I don't do anything fancy with VIDLE, so I have no way of knowing whether there could be problems with some features I don't use. Again, I'm ignorant: How/where do I get "a recent SVN revision"? Would it be any different from C:\Python3.1\Lib\idlelib? (I have Python3.1.2 installed.) I don't feel competent to provide individual patches that are feature-specific, because I haven't studied IDLE in any great depth but rather concentrated just on getting Guilherme's work into the latest Python 3 idlelib. But if I'm told how to get something more recent than C:\Python3.1\Lib\idlelib I can produce a diff patch against it, as one large diff. A detail: Guilherme produced a "Revert" plugin, and the corresponding file doesn't show up in the diff. How would I offer the new file? Bruce Sherwood On Sun, Oct 10, 2010 at 6:19 PM, Tal Einat wrote: > Bruce Sherwood wrote: >> Please forgive me for my ignorance, but how does one offer patches to >> IDLE? At http://vpython.org/vidle/patch.diff is a patch from the >> idlelib installed with Windows Python3.1.2 to vidle, where vidle >> incorporates the work done in the 2009 GSoC by Guilherme Polo, updated >> for Python 3. For details, see my posts of Sept. 14. >> >> I have several questions: >> >> 1) Is the idlelib shipped with Windows Python 3.1.2 the right base to >> diff against? >> >> 2) If not, against what base should I make the diff? >> >> 3) Is one diff for all of idlelib okay, or does one submit separate >> diff files for each file? >> >> 4) How/where do I formally offer this diff? I've never done this before. >> >> I should add that just today I remade the diff at >> http://vpython.org/vidle/patch.diff because I discovered that I'd >> missed an important correction Guilherme had made. The error is >> present in the Python 3.1.2 idlelib. In IOBinding.py one should delete >> this statement: >> >> ? ? self.text.see("insert") >> >> Unless this statement is deleted, when you open a long file the first >> line is not seen; it's above the edit display. This can be pretty >> confusing. > > Since IDLE is part of the Python stdlib, patches (and bugs and > features requests) should be posted on the Python bug tracker at > bugs.python.org. For major patches such as this, a mention on the > idle-dev mailing list is also helpful to get things moving along. > > A patch should contain all relevant changes to all relevant files. > Ideally, a patch should encapsulate a single set of changes, and after > applying it everything should still work as expected. If several > unrelated changes have been made in VIDLE, it might be better to post > a patch for each change separately to make testing and reviewing > simpler. This can take a bit of work though, and it's better to post > one big patch than to post nothing at all. > > Patches should preferably be based on a recent SVN revision. The more > recent the better, but next point is more important... > > Patches should only be posted after having been well tested in order > to avoid frustrating the reviewers. From my experience, posting a > patch and later mentioning small fixes and edge-cases will often cause > a patch not to be accepted, because nobody will want to review it. > Posting a patch and requesting help in fixing a few last problems is > okay, of course, as long as you've recognized the problems and mention > them in advance. > > I hope this helps! I'm itching to get Guilhereme's changes in! > > - Tal Einat > From taleinat at gmail.com Mon Oct 11 12:01:07 2010 From: taleinat at gmail.com (Tal Einat) Date: Mon, 11 Oct 2010 12:01:07 +0200 Subject: [Idle-dev] How does one offer patches? In-Reply-To: References: Message-ID: Bruce Sherwood wrote: > Thanks much, Tal. There has already been extensive testing of VIDLE. > Guilherme's GSoC version was distributed under the name of VIDLE with > VPython 2.6 or 2.7 during the past year with no hint of problems. As > part of getting VPython to work with Python 3 I manually applied > Guilherme's patches to the Python 3 idlelib to make a Python 3 VIDLE > and the diff patch. I've been using Python 3 with VPython and VIDLE > for several weeks on Windows with no problems, and I've used VIDLE a > little on a Mac. However, I don't do anything fancy with VIDLE, so I > have no way of knowing whether there could be problems with some > features I don't use. > > Again, I'm ignorant: How/where do I get "a recent SVN revision"? Would > it be any different from C:\Python3.1\Lib\idlelib? (I have Python3.1.2 > installed.) Generally this is the best way to generate a patch for submission: 1) install an SVN client (on Windows I recommend TortoiseSVN) 2) checkout the Lib\idlelib directory from the Python subversion repository: http://svn.python.org/projects/python/branches/py3k/Lib/idlelib (I wrote that by hand, hopefully it is correct, otherwise use TortoiseSVN's repository browser to get the right path.) 3) apply your changes (remember to "svn add" new files, and "svn delete" removed files!) 4) create a patch (TortoiseSVN has a "create patch" option) For your change, it might be better to: 1) don't check out the latest revision; instead, check out the revision for 3.1.2 (check which revision the 3.1.2 tag was created, by browsing the repository) 2) copy your changes 3) "svn update" to the latest revision, so you can locally merge in the latest updates to IDLE 4) now create a patch and send it > I don't feel competent to provide individual patches that are > feature-specific, because I haven't studied IDLE in any great depth > but rather concentrated just on getting Guilherme's work into the > latest Python 3 idlelib. But if I'm told how to get something more > recent than C:\Python3.1\Lib\idlelib I can produce a diff patch > against it, as one large diff. That would be fine, then. Try to describe all of the changes in the description you write when submitting the patch, though. > A detail: Guilherme produced a "Revert" plugin, and the corresponding > file doesn't show up in the diff. How would I offer the new file? If you use SVN to generate the patch, "svn add" the file(s) before creating the patch. > Bruce Sherwood Good luck! - Tal Einat From basherwo at ncsu.edu Mon Oct 11 20:33:37 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Mon, 11 Oct 2010 12:33:37 -0600 Subject: [Idle-dev] How does one offer patches? In-Reply-To: References: Message-ID: Again, many thanks for the clear instructions, Tal. I'll work on this. Bruce Sherwood On Mon, Oct 11, 2010 at 4:01 AM, Tal Einat wrote: > Bruce Sherwood wrote: >> Thanks much, Tal. There has already been extensive testing of VIDLE. >> Guilherme's GSoC version was distributed under the name of VIDLE with >> VPython 2.6 or 2.7 during the past year with no hint of problems. As >> part of getting VPython to work with Python 3 I manually applied >> Guilherme's patches to the Python 3 idlelib to make a Python 3 VIDLE >> and the diff patch. I've been using Python 3 with VPython and VIDLE >> for several weeks on Windows with no problems, and I've used VIDLE a >> little on a Mac. However, I don't do anything fancy with VIDLE, so I >> have no way of knowing whether there could be problems with some >> features I don't use. >> >> Again, I'm ignorant: How/where do I get "a recent SVN revision"? Would >> it be any different from C:\Python3.1\Lib\idlelib? (I have Python3.1.2 >> installed.) > > Generally this is the best way to generate a patch for submission: > > 1) install an SVN client (on Windows I recommend TortoiseSVN) > 2) checkout the Lib\idlelib directory from the Python subversion repository: > http://svn.python.org/projects/python/branches/py3k/Lib/idlelib > (I wrote that by hand, hopefully it is correct, otherwise use > TortoiseSVN's repository browser to get the right path.) > 3) apply your changes (remember to "svn add" new files, and "svn > delete" removed files!) > 4) create a patch (TortoiseSVN has a "create patch" option) > > For your change, it might be better to: > 1) don't check out the latest revision; instead, check out the > revision for 3.1.2 (check which revision the 3.1.2 tag was created, by > browsing the repository) > 2) copy your changes > 3) "svn update" to the latest revision, so you can locally merge in > the latest updates to IDLE > 4) now create a patch and send it > >> I don't feel competent to provide individual patches that are >> feature-specific, because I haven't studied IDLE in any great depth >> but rather concentrated just on getting Guilherme's work into the >> latest Python 3 idlelib. But if I'm told how to get something more >> recent than C:\Python3.1\Lib\idlelib I can produce a diff patch >> against it, as one large diff. > > That would be fine, then. Try to describe all of the changes in the > description you write when submitting the patch, though. > >> A detail: Guilherme produced a "Revert" plugin, and the corresponding >> file doesn't show up in the diff. How would I offer the new file? > > If you use SVN to generate the patch, "svn add" the file(s) before > creating the patch. > >> Bruce Sherwood > > Good luck! > > - Tal Einat > From basherwo at ncsu.edu Wed Oct 13 05:24:17 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Tue, 12 Oct 2010 21:24:17 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement Message-ID: With great help from Tal Einat on the mechanics of how to submit Guilherme Polo's enhancements, I've presented a diff file to bugs.python.org against the Python 3.1.2 version of idlelib (tag r312). Here's the description: In December 2008 David Scherer created an alternative version of IDLE to fix some long-standing problems. In the 2009 Google Summer of Code Guilherme Polo continued this work, assisted by Bruce Sherwood. Important new fixes and features include: * A configuration preference that permits writing and running test programs from the editor without having to save the file (you're warned upon quitting whether to save). * Bringing the shell window forward in case of an error (because novices often failed to realize why their program had stopped). * A revert plug-in (FileRevert.py). * Unreliable and slow termination of user program on Windows; now you can re-run without first closing the graphics window. * Missing preferences and other menus on Macintosh. * Use any port for RPC server, so multiple instances of VIDLE can run at the same time without interference. Polo submitted patches at the end of the summer of 2009, found at code.google.com/p/google-summer-of-code-2009-python/downloads/list This was for the Python 2.X series. Because the mechanism was not clear for getting these patches into the version of IDLE distributed with Python, the patched version has been distributed with VPython (vpython.org) with the name VIDLE to attempt to avoid confusion with IDLE. It is installed into site-packages. In October 2010 Bruce Sherwood manually applied Polo's patches to the idlelib found at svn.python.org/projects/python/tags/r312/Lib/idlelib In addition to applying Polo's patches, the new code uses the new dot addressing of modules (e.g. from . import PyShell). Except for having to change one absolute address in the use of __import__ in PyShell.py, this version can work either in Python31/Lib/idlelib or in Python31/Lib/site-packages/vidle. This VIDLE will be included in the installer for VPython for Python 3. From guido at python.org Wed Oct 13 05:27:59 2010 From: guido at python.org (Guido van Rossum) Date: Tue, 12 Oct 2010 20:27:59 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: Hi Bruce, Thanks very much you for your perseverance. It sounds like the money on the GSOC student was well spent. Thanks also for observing novices and fixing the issues that cause them the most pain! Hopefully someone will review and commit the patches soon! --Guido On Tue, Oct 12, 2010 at 8:24 PM, Bruce Sherwood wrote: > With great help from Tal Einat on the mechanics of how to submit > Guilherme Polo's enhancements, I've presented a diff file to > bugs.python.org against the Python 3.1.2 version of idlelib (tag > r312). > > Here's the description: > > In December 2008 David Scherer created an alternative version > of IDLE to fix some long-standing problems. In the 2009 Google > Summer of Code Guilherme Polo continued this work, assisted by > Bruce Sherwood. Important new fixes and features include: > > ?* A configuration preference that permits writing and running > ? test programs from the editor without having to save the file > ? (you're warned upon quitting whether to save). > > ?* Bringing the shell window forward in case of an error (because > ? novices often failed to realize why their program had stopped). > ?* A revert plug-in (FileRevert.py). > > ?* Unreliable and slow termination of user program on Windows; > ? now you can re-run without first closing the graphics window. > > ?* Missing preferences and other menus on Macintosh. > > ?* Use any port for RPC server, so multiple instances of VIDLE > ? can run at the same time without interference. > > Polo submitted patches at the end of the summer of 2009, found at > code.google.com/p/google-summer-of-code-2009-python/downloads/list > This was for the Python 2.X series. > > Because the mechanism was not clear for getting these patches > into the version of IDLE distributed with Python, the patched > version has been distributed with VPython (vpython.org) with > the name VIDLE to attempt to avoid confusion with IDLE. It is > installed into site-packages. > > In October 2010 Bruce Sherwood manually applied Polo's patches > to the idlelib found at > ? svn.python.org/projects/python/tags/r312/Lib/idlelib > > In addition to applying Polo's patches, the new code uses the new > dot addressing of modules (e.g. from . import PyShell). Except for > having to change one absolute address in the use of __import__ in > PyShell.py, this version can work either in Python31/Lib/idlelib or > in Python31/Lib/site-packages/vidle. This VIDLE will be included in > the installer for VPython for Python 3. > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > -- --Guido van Rossum (python.org/~guido) From taleinat at gmail.com Wed Oct 13 13:08:02 2010 From: taleinat at gmail.com (Tal Einat) Date: Wed, 13 Oct 2010 13:08:02 +0200 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: I've got some free time on my hands and I now have permission to make commits for IDLE, so I'll take a look at it today. - Tal On Wed, Oct 13, 2010 at 5:27 AM, Guido van Rossum wrote: > Hi Bruce, > > Thanks very much you for your perseverance. It sounds like the money > on the GSOC student was well spent. Thanks also for observing novices > and fixing the issues that cause them the most pain! Hopefully someone > will review and commit the patches soon! > > --Guido > > On Tue, Oct 12, 2010 at 8:24 PM, Bruce Sherwood wrote: >> With great help from Tal Einat on the mechanics of how to submit >> Guilherme Polo's enhancements, I've presented a diff file to >> bugs.python.org against the Python 3.1.2 version of idlelib (tag >> r312). >> >> Here's the description: >> >> In December 2008 David Scherer created an alternative version >> of IDLE to fix some long-standing problems. In the 2009 Google >> Summer of Code Guilherme Polo continued this work, assisted by >> Bruce Sherwood. Important new fixes and features include: >> >> ?* A configuration preference that permits writing and running >> ? test programs from the editor without having to save the file >> ? (you're warned upon quitting whether to save). >> >> ?* Bringing the shell window forward in case of an error (because >> ? novices often failed to realize why their program had stopped). >> ?* A revert plug-in (FileRevert.py). >> >> ?* Unreliable and slow termination of user program on Windows; >> ? now you can re-run without first closing the graphics window. >> >> ?* Missing preferences and other menus on Macintosh. >> >> ?* Use any port for RPC server, so multiple instances of VIDLE >> ? can run at the same time without interference. >> >> Polo submitted patches at the end of the summer of 2009, found at >> code.google.com/p/google-summer-of-code-2009-python/downloads/list >> This was for the Python 2.X series. >> >> Because the mechanism was not clear for getting these patches >> into the version of IDLE distributed with Python, the patched >> version has been distributed with VPython (vpython.org) with >> the name VIDLE to attempt to avoid confusion with IDLE. It is >> installed into site-packages. >> >> In October 2010 Bruce Sherwood manually applied Polo's patches >> to the idlelib found at >> ? svn.python.org/projects/python/tags/r312/Lib/idlelib >> >> In addition to applying Polo's patches, the new code uses the new >> dot addressing of modules (e.g. from . import PyShell). Except for >> having to change one absolute address in the use of __import__ in >> PyShell.py, this version can work either in Python31/Lib/idlelib or >> in Python31/Lib/site-packages/vidle. This VIDLE will be included in >> the installer for VPython for Python 3. >> _______________________________________________ >> IDLE-dev mailing list >> IDLE-dev at python.org >> http://mail.python.org/mailman/listinfo/idle-dev >> > > > > -- > --Guido van Rossum (python.org/~guido) > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > From nad at acm.org Thu Oct 14 07:51:27 2010 From: nad at acm.org (Ned Deily) Date: Wed, 13 Oct 2010 22:51:27 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement References: Message-ID: In article , Bruce Sherwood wrote: > With great help from Tal Einat on the mechanics of how to submit > Guilherme Polo's enhancements, I've presented a diff file to > bugs.python.org against the Python 3.1.2 version of idlelib (tag > r312). Thanks for getting the changes submitted! BTW, I was looking into some other issues with IDLE on OS X and was interested to see whether these enhancements would have any effect on what I was seeing. Normally, at this stage, new features would only be checked into the py3k branch (the main development branch) of the python source trees (rather than the 3.1.x branch which is generally only accepting bug fixes) so I decided to do a quick forward port of the patch to py3k. I've uploaded that patch to the issue tracker. As I noted there, I found that it had no affect on the other issues so I'm not planning to do any more work on the ported patch but it might be of some use as a head start on the py3k port. http://bugs.python.org/issue10079 -- Ned Deily, nad at acm.org From basherwo at ncsu.edu Thu Oct 14 08:18:35 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 00:18:35 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: Thanks for catching the missing utils.py file. I can explain the missing/commented statement in IOBinding.py. I found experimentally that if that statement is present, when you open a file on Windows the first line is off the top of the display, which can be quite confusing; this bug is not present on the Mac, and deleting the statement makes Windows work properly without affecting the Mac. The deletion of the statement was the very last correction Guilherme Polo made, and I got the correction into the patch I submitted but not into an earlier file at vpython.org. Since you've expressed interest in the Mac, I'll post here some comments I sent to Tal Einat this evening: I've found a bug (or maybe it's two bugs) in IDLE, which also affects VIDLE (shorthand for IDLE with my diffs applied). On Windows, using the command line, cd to the idlelib directory, then execute c:\Python31\python idle.pyw. Create a new edit window (if there isn't one already) and enter some text, but don't save. Press ctrl-Q to quit, and you're asked whether you want to save the file. Say yes, and deliberately overwrite an existing file. The file gets saved, and Python exits, but you'll see in the command line window an error in Multicall.py, line 221; trying to remove a func from a list of funcs. If you put print statements in Multicall to debug the problem you'll find that the func isn't in the list because it's memory address doesn't match. In a way, one could say that it doesn't matter, because the file does get saved, it's just that the exit isn't graceful. But it's worrisome. On Mac, the situation is worse, in that when you press cmd-Q to quit, and you have unsaved changes, Python just quits without asking you whether to save the file. This happens whether you're working with an as-yet unsaved file or a saved file to which you've added some text. Again, I emphasize that these are problems of IDLE, not just VIDLE. I'm telling you this rather than filing a bug report at this time on the chance that with your knowledge of IDLE you'll see the problem and fix it in the process of trying out VIDLE. Obviously the Mac problem is quite serious, because you can lose work. Here's another piece of information. On Windows, running from the command line, if I click the window close button I don't get the error, only if I hit ctrl-Q. I'm trying to trace where cmd-Q goes on the Mac and so far I've failed to find it. In particular, neither the close routines in EditorWindow (which are driven by clicking the close box on a window)m nor close_all_callback in FileListm are driven by cmd-Q. So I'm puzzled; cmd-Q does quit Python but I haven't figured out how. Evidently it's taking a branch that does no checks for needing to save a file. Bruce On Wed, Oct 13, 2010 at 11:51 PM, Ned Deily wrote: > In article > , > ?Bruce Sherwood wrote: >> With great help from Tal Einat on the mechanics of how to submit >> Guilherme Polo's enhancements, I've presented a diff file to >> bugs.python.org against the Python 3.1.2 version of idlelib (tag >> r312). > > Thanks for getting the changes submitted! > > BTW, I was looking into some other issues with IDLE on OS X and was > interested to see whether these enhancements would have any effect on > what I was seeing. ?Normally, at this stage, new features would only be > checked into the py3k branch (the main development branch) of the python > source trees (rather than the 3.1.x branch which is generally only > accepting bug fixes) so I decided to do a quick forward port of the > patch to py3k. ?I've uploaded that patch to the issue tracker. ?As I > noted there, I found that it had no affect on the other issues so I'm > not planning to do any more work on the ported patch but it might be of > some use as a head start on the py3k port. > > http://bugs.python.org/issue10079 > > -- > ?Ned Deily, > ?nad at acm.org > From guido at python.org Thu Oct 14 16:57:33 2010 From: guido at python.org (Guido van Rossum) Date: Thu, 14 Oct 2010 07:57:33 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: Is there any chance of getting these changes into 2.7 as well? There will be bugfix updates for 2.7, and David Beazley just tweeted about how the IDLE experience with Python 2.7 got much worse compared to 2.6. -- --Guido van Rossum (python.org/~guido) From basherwo at ncsu.edu Thu Oct 14 17:22:21 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 09:22:21 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: I will submit an appropriate patch for 2.7; vidle was used with 2.6 and 2.7 since summer 2009. There were indeed a variety of problems with idlelib on Python 2 that the temporary fix of vidle addressed. I wasn't aware that things got worse from 2.6 to 2.7, because I only used vidle with these Pythons. I need to check whether the Mac failure to save changes upon pressing cmd-Q was present in 2.7 as well as 3. Bruce Sherwood On Thu, Oct 14, 2010 at 8:57 AM, Guido van Rossum wrote: > Is there any chance of getting these changes into 2.7 as well? There > will be bugfix updates for 2.7, and David Beazley just tweeted about > how the IDLE experience with Python 2.7 got much worse compared to > 2.6. > > -- > --Guido van Rossum (python.org/~guido) > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > From basherwo at ncsu.edu Thu Oct 14 17:29:12 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 09:29:12 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: Yup. Using IDLE on Python 2.7 on a Mac, cmd-Q (or the corresponding menu option, for that matter), there is no prompt to save unsaved files. I hope someone more knowledgeable than me about IDLE can find the problem, or maybe just suggest where I should look. I'll keep looking, but as I said, I'm baffled that I can't even identify what code gets executed upon pressing cmd-Q. I'll go ahead and prepare a patch for idle for Python 2.7 right away that won't have a fix for this serious save problem. The save issue can be considered separately. Bruce Sherwood On Thu, Oct 14, 2010 at 9:22 AM, Bruce Sherwood wrote: > I will submit an appropriate patch for 2.7; vidle was used with 2.6 > and 2.7 since summer 2009. There were indeed a variety of problems > with idlelib on Python 2 that the temporary fix of vidle addressed. I > wasn't aware that things got worse from 2.6 to 2.7, because I only > used vidle with these Pythons. > > I need to check whether the Mac failure to save changes upon pressing > cmd-Q was present in 2.7 as well as 3. > > Bruce Sherwood > > On Thu, Oct 14, 2010 at 8:57 AM, Guido van Rossum wrote: >> Is there any chance of getting these changes into 2.7 as well? There >> will be bugfix updates for 2.7, and David Beazley just tweeted about >> how the IDLE experience with Python 2.7 got much worse compared to >> 2.6. >> >> -- >> --Guido van Rossum (python.org/~guido) >> _______________________________________________ >> IDLE-dev mailing list >> IDLE-dev at python.org >> http://mail.python.org/mailman/listinfo/idle-dev >> > From nad at acm.org Thu Oct 14 17:35:28 2010 From: nad at acm.org (Ned Deily) Date: Thu, 14 Oct 2010 08:35:28 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement References: Message-ID: In article , Guido van Rossum wrote: > Is there any chance of getting these changes into 2.7 as well? There > will be bugfix updates for 2.7, and David Beazley just tweeted about > how the IDLE experience with Python 2.7 got much worse compared to > 2.6. In his tweet he is referring to Python 2.7 on OS X. Perhaps he's running into the problem documented in http://bugs.python.org/issue9227 which is that the IDLE in the new-style 64-bit/32-bit python.org installer variant ("10.5+") is broken on 10.6. The workaround is to use the other ("10.3+", 32-bit only) OS X installer for 2.7. The changes here aren't fixing bugs on OS X and I'm not aware of any other IDLE OS X regressions between 2.6 and 2.7. If there are, I hope someone opens issues for them. -- Ned Deily, nad at acm.org From nad at acm.org Thu Oct 14 18:03:58 2010 From: nad at acm.org (Ned Deily) Date: Thu, 14 Oct 2010 09:03:58 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement References: Message-ID: In article , Bruce Sherwood wrote: > Yup. Using IDLE on Python 2.7 on a Mac, cmd-Q (or the corresponding > menu option, for that matter), there is no prompt to save unsaved > files. I hope someone more knowledgeable than me about IDLE can find > the problem, or maybe just suggest where I should look. I'll keep > looking, but as I said, I'm baffled that I can't even identify what > code gets executed upon pressing cmd-Q. > > I'll go ahead and prepare a patch for idle for Python 2.7 right away > that won't have a fix for this serious save problem. The save issue > can be considered separately. If I understand correctly, quitting without prompting for unsaved files is not a new problem with 2.7; I see the same behavior with 2.6. It would be best, I think, to open an issue on the bug tracker for that problem and any other new specific problems. -- Ned Deily, nad at acm.org From basherwo at ncsu.edu Thu Oct 14 19:25:15 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 11:25:15 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: At Ned Deily's suggestion I've posted the following to bugs.python.org: It has just been discovered that at least since Python 2.6 on the Mac, quitting IDLE does not prompt to save unsaved code, which is then lost. The recently submitted diff for bringing Guilherme Polo's Google Summer of Code improvements into IDLE on Python 3 (ID 10079) does not fix the problem. Bruce Sherwood From tjreedy at udel.edu Fri Oct 15 05:29:24 2010 From: tjreedy at udel.edu (Terry Reedy) Date: Thu, 14 Oct 2010 23:29:24 -0400 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: On 10/14/2010 10:57 AM, Guido van Rossum wrote: > Is there any chance of getting these changes into 2.7 as well? There > will be bugfix updates for 2.7, and David Beazley just tweeted about > how the IDLE experience with Python 2.7 got much worse compared to > 2.6. If there are new features in the patch, it would violate the 'no new features in bugfixes' policy. On the other hand, since IDLE is used interactively rather than in programs, I do not think the reason for the policy applies as strongly as to everything else in the stdlib. Bruce, if you post a 2.7 patch with new features, please quote Guido's request so that tracker gardeners will know that it has BDFL approval in that regard. -- Terry Jan Reedy From basherwo at ncsu.edu Fri Oct 15 06:24:32 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 22:24:32 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: Ned Deily's note (repeated here) made me think that I should not submit a patch for 2.7 because he has reason to believe that the problems aren't with IDLE. Bruce Sherwood ---------------------------------------- In article , Guido van Rossum wrote: > Is there any chance of getting these changes into 2.7 as well? There > will be bugfix updates for 2.7, and David Beazley just tweeted about > how the IDLE experience with Python 2.7 got much worse compared to > 2.6. In his tweet he is referring to Python 2.7 on OS X. Perhaps he's running into the problem documented in http://bugs.python.org/issue9227 which is that the IDLE in the new-style 64-bit/32-bit python.org installer variant ("10.5+") is broken on 10.6. The workaround is to use the other ("10.3+", 32-bit only) OS X installer for 2.7. The changes here aren't fixing bugs on OS X and I'm not aware of any other IDLE OS X regressions between 2.6 and 2.7. If there are, I hope someone opens issues for them. -- Ned Deily, nad at acm.org On Thu, Oct 14, 2010 at 9:29 PM, Terry Reedy wrote: > On 10/14/2010 10:57 AM, Guido van Rossum wrote: >> >> Is there any chance of getting these changes into 2.7 as well? There >> will be bugfix updates for 2.7, and David Beazley just tweeted about >> how the IDLE experience with Python 2.7 got much worse compared to >> 2.6. > > If there are new features in the patch, it would violate the 'no new > features in bugfixes' policy. On the other hand, since IDLE is used > interactively rather than in programs, I do not think the reason for the > policy applies as strongly as to everything else in the stdlib. > > Bruce, if you post a 2.7 patch with new features, please quote Guido's > request so that tracker gardeners will know that it has BDFL approval in > that regard. > > -- > Terry Jan Reedy > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > From basherwo at ncsu.edu Fri Oct 15 06:25:23 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 22:25:23 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: I'm trying to find out why when you quit on the Mac unsaved changes don't trigger an invitation to save the file. Instead, IDLE quits and you lose your edits. There is code to bind cmd-q to the edit window and, on the Mac, to the Tk root, through macosxSupport.setupApp which calls macosxSupport overrideRootMenu. I've tried printing something in the callback routine (FileList.close_all_callback), and I don't see the print. I've tried commenting out one or both of these bindings, and I can still quit with cmd-q. I've looked a bit at the tkinter code. I'm beginning to have the sinking feeling that there's something in the library _tkinter.so itself that is swallowing cmd-q and not sending it to tkinter, so it doesn't get to IDLE. I have the vague notion that there have been some problems with tkinter on the Mac, but I don't know any details....? Is there someone who reads this idle-dev list who knows enough about _tkinter.so on the Mac to be able to say whether this could be the problem? If _tkinter.so doesn't pass through to IDLE a cmd-q event (or the equivalent menu choice to quit), there's nothing we can do to make IDLE work properly on the Mac without changes to _tkinter.so. I don't feel competent to design a clean simple tkinter test to prove the point and post a bug report. Of course I could be missing something somehow, but on Windows if I put a print statement in the callback routine I see that text when I press ctrl-q. Bruce Sherwood From nad at acm.org Fri Oct 15 07:14:24 2010 From: nad at acm.org (Ned Deily) Date: Thu, 14 Oct 2010 22:14:24 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement References: Message-ID: In article , Bruce Sherwood wrote: > I'm trying to find out why when you quit on the Mac unsaved changes > don't trigger an invitation to save the file. Instead, IDLE quits and > you lose your edits. > > There is code to bind cmd-q to the edit window and, on the Mac, to the > Tk root, through macosxSupport.setupApp which calls macosxSupport > overrideRootMenu. I've tried printing something in the callback > routine (FileList.close_all_callback), and I don't see the print. I've > tried commenting out one or both of these bindings, and I can still > quit with cmd-q. I've looked a bit at the tkinter code. I'm beginning > to have the sinking feeling that there's something in the library > _tkinter.so itself that is swallowing cmd-q and not sending it to > tkinter, so it doesn't get to IDLE. I have the vague notion that there > have been some problems with tkinter on the Mac, but I don't know any > details....? Working on it. The problem is due to the fact that the standard Aqua Tk on OS X is itself an official OS X app and creates the menu bar with default menu options including a standard application Quit. I think I see how to intercept that. I suggest we move the discussion to the bug tracker (http://bugs.python.org/issue10107). -- Ned Deily, nad at acm.org From nad at acm.org Fri Oct 15 07:21:09 2010 From: nad at acm.org (Ned Deily) Date: Thu, 14 Oct 2010 22:21:09 -0700 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement References: Message-ID: In article , Bruce Sherwood wrote: > Ned Deily's note (repeated here) made me think that I should not > submit a patch for 2.7 because he has reason to believe that the > problems aren't with IDLE. I think the question of whether Guilherme's enhancements should go into 2.7 is independent of the "quit" problem, which I was unaware of until it was brought by here earlier today. I agree with Terry's comment regarding 2.7; if you are willing to make a 2.7 patch, my vote would be to submit it. And if there are other bugs that people know of, it would be more helpful to open bug tracker issues for them rather than tweeting about them. -- Ned Deily, nad at acm.org From basherwo at ncsu.edu Fri Oct 15 07:55:00 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 23:55:00 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: I'm relieved to hear that you may have a way to override. Yes, let's continue the discussion in the bug report context. Bruce Sherwood On Thu, Oct 14, 2010 at 11:14 PM, Ned Deily wrote: > In article > , > ?Bruce Sherwood wrote: > >> I'm trying to find out why when you quit on the Mac unsaved changes >> don't trigger an invitation to save the file. Instead, IDLE quits and >> you lose your edits. >> >> There is code to bind cmd-q to the edit window and, on the Mac, to the >> Tk root, through macosxSupport.setupApp which calls macosxSupport >> overrideRootMenu. I've tried printing something in the callback >> routine (FileList.close_all_callback), and I don't see the print. I've >> tried commenting out one or both of these bindings, and I can still >> quit with cmd-q. I've looked a bit at the tkinter code. I'm beginning >> to have the sinking feeling that there's something in the library >> _tkinter.so itself that is swallowing cmd-q and not sending it to >> tkinter, so it doesn't get to IDLE. I have the vague notion that there >> have been some problems with tkinter on the Mac, but I don't know any >> details....? > > Working on it. ?The problem is due to the fact that the standard Aqua Tk > on OS X is itself an official OS X app and creates the menu bar with > default menu options including a standard application Quit. ? I think I > see how to intercept that. > > I suggest we move the discussion to the bug tracker > (http://bugs.python.org/issue10107). > > -- > ?Ned Deily, > ?nad at acm.org > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > From basherwo at ncsu.edu Fri Oct 15 07:58:03 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Thu, 14 Oct 2010 23:58:03 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: I'm quite happy to prepare a patch for 2.7; one possibility is to make a diff from the 2.7 version of vidle. I guess I misinterpreted your comments about 32/64 etc. I'll be out of touch for the next couple days. I'm really excited about a two-day visit to Zuni Pueblo (New Mexico). Bruce Sherwood On Thu, Oct 14, 2010 at 11:21 PM, Ned Deily wrote: > In article > , > ?Bruce Sherwood wrote: > >> Ned Deily's note (repeated here) made me think that I should not >> submit a patch for 2.7 because he has reason to believe that the >> problems aren't with IDLE. > > I think the question of whether Guilherme's enhancements should go into > 2.7 is independent of the "quit" problem, which I was unaware of until > it was brought by here earlier today. ?I agree with Terry's comment > regarding 2.7; if you are willing to make a 2.7 patch, my vote would be > to submit it. ?And if there are other bugs that people know of, it would > be more helpful to open bug tracker issues for them rather than tweeting > about them. > > -- > ?Ned Deily, > ?nad at acm.org > > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > From kw at codebykevin.com Fri Oct 15 14:17:34 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 15 Oct 2010 08:17:34 -0400 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: <4CB8465E.4020305@codebykevin.com> On 10/15/10 12:25 AM, Bruce Sherwood wrote: > I'm trying to find out why when you quit on the Mac unsaved changes > don't trigger an invitation to save the file. Instead, IDLE quits and > you lose your edits. > > There is code to bind cmd-q to the edit window and, on the Mac, to the > Tk root, through macosxSupport.setupApp which calls macosxSupport > overrideRootMenu. I've tried printing something in the callback > routine (FileList.close_all_callback), and I don't see the print. I've > tried commenting out one or both of these bindings, and I can still > quit with cmd-q. I've looked a bit at the tkinter code. I'm beginning > to have the sinking feeling that there's something in the library > _tkinter.so itself that is swallowing cmd-q and not sending it to > tkinter, so it doesn't get to IDLE. I have the vague notion that there > have been some problems with tkinter on the Mac, but I don't know any > details....? > > Is there someone who reads this idle-dev list who knows enough about > _tkinter.so on the Mac to be able to say whether this could be the > problem? If _tkinter.so doesn't pass through to IDLE a cmd-q event (or > the equivalent menu choice to quit), there's nothing we can do to make > IDLE work properly on the Mac without changes to _tkinter.so. I don't > feel competent to design a clean simple tkinter test to prove the > point and post a bug report. Tk on the Mac has a built in command called ::tk::mac::Quit, which corresponds to the "quit" Apple event. If this command is not defined, then I believe the default behavior for Tk on the Mac is to quit (when accessed from the menu--not sure about Command-Q). I think the right way to manage this in IDLE would be to do something like this: root.createcommand('::tk::mac::Quit', ) This will map whatever function IDLE calls to prompt the user to save data before closing, to the Apple quit event. (Sorry I don't have time to submit a patch, but hopefully this can point someone in the right direction.) --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From basherwo at ncsu.edu Fri Oct 15 15:34:46 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Fri, 15 Oct 2010 07:34:46 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: <4CB8465E.4020305@codebykevin.com> References: <4CB8465E.4020305@codebykevin.com> Message-ID: The following statement is executed in macosxSupport.py, which I assume was an attempt to override, but it's unsuccessful: root.bind('<>', flist.close_all_callback) Bruce Sherwood On Fri, Oct 15, 2010 at 6:17 AM, Kevin Walzer wrote: > > Tk on the Mac has a built in command called ::tk::mac::Quit, which > corresponds to the "quit" Apple event. If this command is not defined, then > I believe the default behavior for Tk on the Mac is to quit (when accessed > from the menu--not sure about Command-Q). I think the right way to manage > this in IDLE would be to do something like this: > > root.createcommand('::tk::mac::Quit', here>) > > This will map whatever function IDLE calls to prompt the user to save data > before closing, to the Apple quit event. > > (Sorry I don't have time to submit a patch, but hopefully this can point > someone in the right direction.) > > --Kevin > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > _______________________________________________ > IDLE-dev mailing list > IDLE-dev at python.org > http://mail.python.org/mailman/listinfo/idle-dev > From kw at codebykevin.com Fri Oct 15 15:47:25 2010 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 15 Oct 2010 09:47:25 -0400 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: <4CB8465E.4020305@codebykevin.com> Message-ID: <4CB85B6D.7090800@codebykevin.com> On 10/15/10 9:34 AM, Bruce Sherwood wrote: > The following statement is executed in macosxSupport.py, which I > assume was an attempt to override, but it's unsuccessful: > > root.bind('<>', flist.close_all_callback) > > Bruce Sherwood A grep of the 2.6 idleib code on my system does not turn up any references to tk::mac::Quit. I think that needs to be defined somewhere. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com From taleinat at gmail.com Fri Oct 15 18:14:27 2010 From: taleinat at gmail.com (Tal Einat) Date: Fri, 15 Oct 2010 18:14:27 +0200 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: Message-ID: On Fri, Oct 15, 2010 at 7:58 AM, Bruce Sherwood wrote: > I'm quite happy to prepare a patch for 2.7; one possibility is to make > a diff from the 2.7 version of vidle. I guess I misinterpreted your > comments about 32/64 etc. I'll be out of touch for the next couple > days. I'm really excited about a two-day visit to Zuni Pueblo (New > Mexico). > > Bruce Sherwood This discussion has gone in several directions in parallel, so I'd like to summarize: First, Bruce has supplied a patch for IDLE based on 3.1.2, which I will review. Second, Guido suggested getting these changes into Python 2.7 as well. Bruce has agreed to supply a patch, and I will try to review it as well. Finally, a bug in IDLE on OSX has come up, where IDLE fails to exit cleanly when a user presses Command+Q. A bug report has been opened on the issue tracker and it seems that a solution is on the way. That's all, folks :) - Tal Einat From basherwo at ncsu.edu Mon Oct 18 17:56:26 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Mon, 18 Oct 2010 09:56:26 -0600 Subject: [Idle-dev] New IDLE for Python 2.7 Message-ID: http://bugs.python.org/issue10137 At Guido's request, I've carried out the same update to the IDLE distributed with Python 2.7 that I submitted for Python 3, to incorporate the work of Guilherme Polo in the Google Summer of Code 2009. Guido was concerned that with significant problems reported for IDLE 2.7, there should be an update despite Python 2.7 itself being essentially frozen. The basic structure for IDLE 3.2 was carried over. The main changes that had to be made were the change in module names between Python 2.7 and Python 3.2 (e.g. Tkinter in 2.7 is tkinter in 3.2). Bruce Sherwood From basherwo at ncsu.edu Tue Oct 19 07:16:26 2010 From: basherwo at ncsu.edu (Bruce Sherwood) Date: Mon, 18 Oct 2010 23:16:26 -0600 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: <256A8687-B6E1-4F16-A5EE-BB080C5D0DAF@acm.org> References: <256A8687-B6E1-4F16-A5EE-BB080C5D0DAF@acm.org> Message-ID: As was suggested by Ned Deily, I've added this to Issue 10079 at bugs.python.org: At Guido's request, I've carried out the same update to the IDLE distributed with Python 2.7 that I submitted for Python 3, to incorporate the work of Guilherme Polo in the Google Summer of Code 2009. Guido was concerned that with significant problems reported for IDLE 2.7, there should be an update despite Python 2.7 itself being essentially frozen. The basic structure for IDLE 3.2 was carried over. The main changes that had to be made to the Polo code were the change in module names between Python 2.7 and Python 3.2 (e.g. Tkinter in 2.7 is tkinter in 3.2). The patch was built from the release27-maint branch. Issue 10137 should now be listed as a duplicate. Bruce Sherwood From taleinat at gmail.com Wed Oct 20 15:18:11 2010 From: taleinat at gmail.com (Tal Einat) Date: Wed, 20 Oct 2010 15:18:11 +0200 Subject: [Idle-dev] Submitted Guilherme Polo's enhancement In-Reply-To: References: <256A8687-B6E1-4F16-A5EE-BB080C5D0DAF@acm.org> Message-ID: On Tue, Oct 19, 2010 at 7:16 AM, Bruce Sherwood wrote: > As was suggested by Ned Deily, I've added this to Issue 10079 at > bugs.python.org: > > At Guido's request, I've carried out the same update to the IDLE > distributed with Python 2.7 that I submitted for Python 3, to > incorporate the work of Guilherme Polo in the Google Summer of Code > 2009. Guido was concerned that with significant problems reported for > IDLE 2.7, there should be an update despite Python 2.7 itself being > essentially frozen. The basic structure for IDLE 3.2 was carried over. > The main changes that had to be made to the Polo code were the change > in module names between Python 2.7 and Python 3.2 (e.g. Tkinter in 2.7 > is tkinter in 3.2). The patch was built from the release27-maint > branch. Issue 10137 should now be listed as a duplicate. Thanks Bruce :) - Tal Einat