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.

classification
Title: TclError is a str should be an Exception
Type: Stage:
Components: Tkinter Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: loewis, nnorwitz, rhettinger
Priority: normal Keywords:

Created on 2002-05-17 20:39 by nnorwitz, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tkinter.diff nnorwitz, 2002-05-25 13:34 patch 1 to _tkinter.c
Messages (6)
msg10836 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-05-17 20:39
Since string exceptions are deprecated, it seems that
TclError (in _tkinter.c) should be changed to derive
from Exception.

It isn't apparent to me how to accomplish this.  If
someone can provide a quick high-level description, I
can make a patch.
msg10837 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-05-18 08:45
Logged In: YES 
user_id=80475

Try makeclass() in Python/exceptions.c -- the file also 
shows how all the built-in exceptions get created.
msg10838 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-05-22 16:56
Logged In: YES 
user_id=21627

The official API is PyErr_NewException, where NULL as the
base class indicates to inherit from Exception.
msg10839 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-05-25 13:34
Logged In: YES 
user_id=33168

The attached patch seems to work,
but I'm not sure I'm exercising it appropriately.
msg10840 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-06-02 12:49
Logged In: YES 
user_id=21627

The patch looks good; please apply it. Also add a note in
Misc/NEWS, and send a message to python-dev or amk that this
is potentially an incompatibility.
msg10841 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-06-04 17:14
Logged In: YES 
user_id=33168

Checked in as Modules/_tkinter.c 1.125 and Misc/NEWS 1.415
History
Date User Action Args
2022-04-10 16:05:19adminsetgithub: 36613
2002-05-17 20:39:00nnorwitzcreate