-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch for IDLE/OS X to work with Tk-Cocoa #50325
Comments
In version 8.6 of Tk (now in beta stage), Tk on OS X will be built on top |
These patches were tested on Python/IDLE 2.6.2 and Tk version 8.5.7. My |
This updated patch of macosxSupport.py adds a fix that addresses the |
additional refinement to help_dialog command, makes menu consistent |
typo in macosxSupport.patch--fixed |
The patches look acceptable on first glance. Which configurations of Tk have you tested? IMHO IDLE should work with the
|
Tested against Tk-Cocoa (the build of Tk-8.5 that comes with Snow Leopard; |
I'm about to test the patches on a 10.4 system with Tk 8.4 and will report These patches might be useful to bpo-6864, that issue says IDLE blocks |
I've run into an additional problem with these patches. While they |
I have tried to apply the patches to python's trunk, but they don't apply Could you please rework the patches into a single larger patch that |
Single revised diff, "tkcocoa.diff", attached, applied against Python |
Re: msg 93821, the comment about redundant entries being appended to a I've reproduced this behavior in Tk-Cocoa itself, and have concluded it's |
Apparently the extra menu entries are related to an Appkit bug on Leopard |
Thank you very much for the patch. I have updated it and modified it somewhat to work with the latest tip for py3k (3.2b1), 3.1.3+, and 2.7.1+ and to work with both AquaTk Cocoa 8.5 and preserve current behavior with legacy AquaTk Carbon 8.4. Since there are no automated tests for IDLE in the standard library and since the issues here had to do with differences in menu cascades and options, I created a program to introspect IDLE menus using the OS X GUI Scripting interface via py-appscript. That allowed me to semi-automatically capture the menu configurations for the IDLE configurations of interest (in particular, Apple-supplied Tk vs ActiveState Tk). The following Tcl/Tk configurations - all currently, or shortly to be, supported by python.org installers - were tested: OS X Tcl/Tk Each of those Tcl/Tk configurations was tested with both IDLE.app and bin/idle, each with both py3k(3.2b1+) and 2.7.1+ builds, and each of those with both IDLE Editor windows and IDLE shell windows (they have somewhat different menu configurations). Note that testing on 10.3 was much more limited since appscript, and hence the menutester, is not supported there. Also no regressions were noted when applied to 3.1.3+ in a 32-bit only build. So far, the recently available ActiveState 64-bit Cocoa Tcl/Tk 8.5 has proven to be much more stable than the Apple-supplied 8.5 version in 10.6, which had rendered the 64-bit versions of IDLE virtually unusable up to now. With the final patches applied, I found no regressions in the menu cascades for IDLE.app. When running bin/idle (from the command line), there is a slight difference when using Cocoa Tk vs Carbon Tk. Both variants of AquaTk automatically supplies the application names from the app bundle plist. Because of the way bin/idle is structured today, the app name appears as "Python" rather than "IDLE". With Cocoa Tk, that appears in a couple more menu items ("About app" and "app Help") than it already does with Carbon Tk. While that would be nice to fix at some point, it is an existing cosmetic issue and I assume most inexperienced users will use IDLE.app, where there is no discrepancy. I believe this fix is ready to be applied and should go into 3.2 (and as soon as possible released for 2.7) in conjunction with building the 64-bit OS X installer to allow use of the ActiveState Cocoa 8.5. This will fix a number of reported problems with the broken IDLE with previous 64-bit OS X installers. Still to be done prior to release is updating the installer README and documenting a few minor issues. A longer-term issue is to make the menu introspection tests automatic enough to be added to the standard tests as an optional OS X test. |
I've committed in the py3k branch as r87394, so that this can get testing during beta, although your list of test systems looks quite exhaustive already. Lowering priority and leaving open for the backports. |
Ned--thank you for reviewing, testing, and modifying the patch. I applied your revised version to my new install of Python 2.7.1 and it works fine. |
Backported to 2.7 in r88090 (to appear in 2.7.2). (I decided to not backport to 3.1 as some prereq backports would be needed and we do not supply a 64-bit OS X installer for 3.1.x anyway.) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: