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.

Author ned.deily
Recipients amaury.forgeotdarc, donmez, gpolo, ned.deily, pitrou
Date 2010-10-05.05:04:36
SpamBayes Score 9.755308e-12
Marked as misclassified No
Message-id <1286255083.91.0.987586470982.issue9899@psf.upfronthosting.co.za>
In-reply-to
Content
After further investigation, on OS X at least, there is a difference in behavior between Tk 8.4 (the system default on OS X 10.4 and 10.5) and Tk 8.5 (the default on 10.6).  Lib/tkinter/font.py calls the Tk "font names" commands to check whether a font is already defined.  At the point where test_font.py is initially run, there has not been any real Tk activity yet.  For some reason, with 8.5 the system font names are returned; with 8.4 they are not:

$ /usr/bin/wish8.4
% font names
$ /usr/bin/wish8.5
% font names
systemPushButtonFont systemMenuItemFont systemApplicationFont systemSystemFont systemMenuItemMarkFont TkMenuFont TkDefaultFont systemSmallEmphasizedSystemFont systemDetailEmphasizedSystemFont systemMiniSystemFont TkHeadingFont TkTooltipFont systemUtilityWindowTitleFont systemViewsFont systemSmallSystemFont systemMenuTitleFont systemEmphasizedSystemFont TkTextFont systemDetailSystemFont TkCaptionFont systemLabelFont systemAlertHeaderFont systemMenuItemCmdKeyFont TkSmallCaptionFont TkFixedFont systemWindowTitleFont systemToolbarFont TkIconFont

So, a solution for that is to add a try block in test_font.py to create a font definition for TkDefaultFont if it does not already exist.  (Presumably, after the test failed and before it was re-run, other tests ran which caused the fonts to be defined so it passes.)  This time I have tested it with both Tk 8.4 and 8.5 on OS X 10.5 and 10.6.  Additional patch file attached (to be applied on top of the already applied first patch).
History
Date User Action Args
2010-10-05 05:04:49ned.deilysetrecipients: + ned.deily, amaury.forgeotdarc, pitrou, donmez, gpolo
2010-10-05 05:04:43ned.deilysetmessageid: <1286255083.91.0.987586470982.issue9899@psf.upfronthosting.co.za>
2010-10-05 05:04:41ned.deilylinkissue9899 messages
2010-10-05 05:04:39ned.deilycreate