[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-10-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I've committed the patch in r85229. Let's see if this makes the buildbots happy.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-10-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Looks alright, thank you!

--
resolution: accepted - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-10-04 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

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).

--
assignee: ned.deily - 
resolution: fixed - accepted
stage: committed/rejected - patch review
Added file: http://bugs.python.org/file19130/issue9899-fix1-py3k.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-26 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Actually, most buildbots were fixed but a couple of them still show a problem:

test_font_eq (tkinter.test.test_tkinter.test_font.FontTest) ... ERROR
testLoadTk (tkinter.test.test_tkinter.test_loadtk.TkLoadTest) ... skipped 'No 
$DISPLAY set.'
testLoadTkFailure (tkinter.test.test_tkinter.test_loadtk.TkLoadTest) ... ok
test_search (tkinter.test.test_tkinter.test_text.TextTest) ... ok

==
ERROR: test_font_eq (tkinter.test.test_tkinter.test_font.FontTest)
--
Traceback (most recent call last):
  File 
/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/test_tkinter/test_font.py,
 line 18, in test_font_eq
font1 = font.nametofont(TkDefaultFont)
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/font.py, line 
22, in nametofont
return Font(name=name, exists=True)
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/font.py, line 
83, in __init__
named font %s does not already exist % (self.name,))
_tkinter.TclError: named font TkDefaultFont does not already exist


Intriguingly, when the test gets re-run at the end of the test suite, the test 
succeeds.
Does it depend on another initialization that is done in another test file?

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-26 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Could be, particularly if the user name under which the test is running is not 
logged in (to the window manager) on the buildbot.  I'll investigate.

--
assignee:  - ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-21 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Patch committed in r84952. Thanks!

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-21 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
status: pending - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Patch works here (Mandriva Linux).

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-20 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Somebody want to commit it?

--
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9899] tkinter test_font fails on OS X with Aqua Tk

2010-09-19 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

r84865 for Issue1730136 introduced a new tkinter test, test_font.  As it 
stands, the test fails on OS X 10.6 when Python is built with Aqua Tk, at least 
with either the Apple-supplied 8.5 or the ActiveState 8.5 (I haven't tried with 
any of the Aqua 8.4 version).  The main problem is that font system is not a 
font name returned by the interface used by tkinter/font.py:

$ /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
% font actual system
-family {Lucida Grande} -size 13 -weight normal -slant roman -underline 0 
-overstrike 0

Based on the man page here (http://www.tcl.tk/man/tcl8.5/TkCmd/font.htm#M31) it 
appears any of the standard font names would be a better choice, like 
TkDefaultFont.

Also, test_font should include the standard tkinter.test setUp and setDown 
functions so that the test can be run by itself.

The attached patch should fix both issues.

--
components: +Tkinter
keywords: +patch
nosy: +amaury.forgeotdarc, gpolo, ned.deily
stage:  - patch review
title: [REGRESSION] test_tk broken on MacOSX 10.6 - tkinter test_font fails on 
OS X with Aqua Tk
Added file: http://bugs.python.org/file18934/issue9899-py3k.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com