classification
Title: Tkinter.Text: changes for bbox, debug, and edit methods.
Type: behavior Stage: resolved
Components: Tkinter Versions: Python 3.4, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: BreamoreBoy, gpolo, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2009-05-31 20:06 by gpolo, last changed 2014-01-11 11:16 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
tkinter_text_changes.diff gpolo, 2009-05-31 20:06 review
tkinter_text_changes_2.patch serhiy.storchaka, 2013-11-02 10:08 review
Messages (8)
msg88607 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-05-31 20:06
Hi,

While testing Tkinter.Text I've found some problems and it would be good
to fix them in trunk.

The methods edit_redo, edit_reset, edit_separator and edit_undo doesn't
return anything, so I would suggest to remove the return statements there.
The debug method doesn't return a boolean when we set a value for the
debug option, so the getboolean function fails:

>>> import Tkinter
>>> text = Tkinter.Text()
>>> text.debug()
False
>>> text.debug(1)
...
_tkinter.TclError: expected boolean value but got ""


I'm also suggesting a change in the bbox signature. Right now it
supports receiving multiple args, but the bbox command in Tcl expects a
single item as the index. I believe it makes more sense to indicate that
it accepts a single argument. An index like '1.0 +1c' needs to either be
passed as '1.0 +1c' or ('1.0', '+1c') (a tuple holding the two parts),
not as '1.0', '+1c' (two arguments).
msg112287 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-08-01 08:20
The suggested changes are mostly trivial, but there should be comments on the change to the bbox signature.
msg179068 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-01-04 19:00
LGTM.
msg201498 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-10-27 20:51
Guilherme, do you want commit your patches or let me do this for your?
msg201843 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-10-31 18:58
Issue19085 adds test file in which test for this issue should be placed.
msg201967 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-11-02 09:53
Here is a patch with tests.

Only fix for tkinter.Text.debug() (and perhaps test_bbox) should be backported to maintenance releases.
msg202018 - (view) Author: Roundup Robot (python-dev) Date: 2013-11-03 12:35
New changeset b3178d03871b by Serhiy Storchaka in branch '2.7':
Issue #6157: Fixed Tkinter.Text.debug().  Original patch by Guilherme Polo.
http://hg.python.org/cpython/rev/b3178d03871b

New changeset 3f5e35b766ac by Serhiy Storchaka in branch '3.3':
Issue #6157: Fixed tkinter.Text.debug().  Original patch by Guilherme Polo.
http://hg.python.org/cpython/rev/3f5e35b766ac

New changeset c40b573c9f7a by Serhiy Storchaka in branch 'default':
Issue #6157: Fixed tkinter.Text.debug().  tkinter.Text.bbox() now raises
http://hg.python.org/cpython/rev/c40b573c9f7a
msg207906 - (view) Author: Roundup Robot (python-dev) Date: 2014-01-11 11:15
New changeset 7dab4feec126 by Serhiy Storchaka in branch '2.7':
tkinter.Text.debug() now always returns 0/1.
http://hg.python.org/cpython/rev/7dab4feec126

New changeset 05e84d3ecd1e by Serhiy Storchaka in branch '3.3':
tkinter.Text.debug() now always returns 0/1.
http://hg.python.org/cpython/rev/05e84d3ecd1e

New changeset e7d922d8ee03 by Serhiy Storchaka in branch 'default':
tkinter.Text.debug() now always returns 0/1.
http://hg.python.org/cpython/rev/e7d922d8ee03
History
Date User Action Args
2014-01-11 11:16:00python-devsetmessages: + msg207906
2013-11-03 13:35:01serhiy.storchakasetstatus: open -> closed
dependencies: - Add tkinter basic options tests
resolution: fixed
stage: commit review -> resolved
2013-11-03 12:35:14python-devsetnosy: + python-dev
messages: + msg202018
2013-11-02 10:08:37serhiy.storchakasetfiles: + tkinter_text_changes_2.patch
2013-11-02 09:53:52serhiy.storchakasetmessages: + msg201967
versions: + Python 2.7, Python 3.3
2013-10-31 18:58:43serhiy.storchakasetmessages: + msg201843
2013-10-31 18:56:52serhiy.storchakasetdependencies: + Add tkinter basic options tests
versions: - Python 2.7, Python 3.3
2013-10-31 16:07:52serhiy.storchakasetassignee: serhiy.storchaka
2013-10-27 20:51:49serhiy.storchakasetmessages: + msg201498
versions: - Python 3.2
2013-01-04 19:00:31serhiy.storchakasetversions: + Python 3.3, Python 3.4, - Python 3.1
nosy: + serhiy.storchaka

messages: + msg179068

stage: patch review -> commit review
2010-08-01 08:20:34BreamoreBoysetversions: + Python 3.2
nosy: + BreamoreBoy

messages: + msg112287

type: behavior
stage: patch review
2009-05-31 20:06:12gpolocreate