[issue6160] Tkinter.Spinbox: fix bbox method

2013-11-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 91453ba40b30 by Serhiy Storchaka in branch '2.7':
Issue #6160: The bbox() method of Tkinter.Spinbox now returns a tuple of
http://hg.python.org/cpython/rev/91453ba40b30

New changeset 5bdbf2258563 by Serhiy Storchaka in branch '3.3':
Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
http://hg.python.org/cpython/rev/5bdbf2258563

New changeset 75d8b9136fa6 by Serhiy Storchaka in branch 'default':
Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of
http://hg.python.org/cpython/rev/75d8b9136fa6

--
nosy: +python-dev

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



[issue6160] Tkinter.Spinbox: fix bbox method

2013-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Terry.

 The new test looks good.

This is a copy of a test for ttk.Entry.

 Grepping tkinter.__init__.py for 'an empty string' gives multiple hits that 
 indicate to me (without detailed examination) that there are about 7 methods 
 that return such. This is slightly odd in a Python context, but it is 
 documented, hence not wrong.

Actually there are methods which always return empty string without documenting 
it. I removed such changes from other Guilherme's patches.

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

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



[issue6160] Tkinter.Spinbox: fix bbox method

2013-11-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The bbox fix and the return change are unrelated issues. Let us separate them.

There are bbox methods for Grid, Canvax, Listbox, Text, and Spinbox. All are 
documented as returning tuples of (4) ints, though there are two different 
interpretations. The first 4 end with
  return self._getints(self.tk.call(...)) or None

Spinbox.bbox should be fixed in all versions to do the same. (The current patch 
leave off 'or None'. I am not sure if it is ever 'triggered', but let's be 
consistent.)  The new test looks good. I thought of checking that they are all 
non-negative, but that would really be a tk test and would not catch tk being 
off by 1, which I think is more likely than tk completely blundering by 
returning a negative int.

Grepping tkinter.__init__.py for 'an empty string' gives multiple hits that 
indicate to me (without detailed examination) that there are about 7 methods 
that return such. This is slightly odd in a Python context, but it is 
documented, hence not wrong. It does not seem to cause a problem; hence it 
should only be changed in the future after a deprecation period. (At least, I 
would not do so without pydev discussion, even though no sane code I can think 
of other than a complete test should depend on the return.) Moreover, no 
deprecation warning would be possible. So I would reject the idea unless 
someone wants to open a new issue and examine all such returns for possible 
change in Python 4.

Anyway, I removed '' returns from the title to make this issue just about 
Spinbox.bbox. With the patch (and news item) limited to bbox and its test and 
'or None' added, I think this would be ready to push.

--
title: Tkinter.Spinbox: fix for bbox and removed some uninteresting returns - 
Tkinter.Spinbox: fix bbox method

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