[Python-Dev] 2.5: uses of sys.exc_type, exc_value (original) (raw)
Guido van Rossum guido at python.org
Wed Jul 26 20:21:50 CEST 2006
- Previous message: [Python-Dev] 2.5: uses of sys.exc_type, exc_value
- Next message: [Python-Dev] New miniconf module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Clearly they should be fixed. Whether in 2.5 or 2.6 I'll leave up to Neal and Anthony.
On 7/26/06, A.M. Kuchling <amk at amk.ca> wrote:
http://www.python.org/sf/1525469 reports that SimpleXMLRPCServer.py still uses sys.exctype and sys.excvalue when handling exceptions. These variables aren't thread-safe and sys.excinfo() is the better way. I have a patch attached to the bug that fixes the problem.
Question 1: is this worth fixing for 2.5? (It's not really a bugfix, more of a style cleanup.) Question 2: I searched for uses of the old variables and found these: Lib/idlelib/WindowList.py: sys.exctype, ":", sys.excvalue Lib/logging/init.py: return sys.exctraceback.tbframe.fback Lib/lib-tk/Tkinter.py: exc, val, tb = sys.exctype, sys.excvalue, sys.exctraceback Lib/plat-mac/cfmfile.py: raise Res.Error, "no 'cfrg' resource found", sys.exctraceback Lib/SocketServer.py: sys.exctraceback = None # Help garbage collection Plus some references in the test suite, the demos, and faqwizard.py. SocketServer should use sys.excclear() instead. Tkinter.py could just call excinfo(), but I wonder if the usage of the variables is intentional here. sys.excinfo() was introduced in Python 1.5, so logging/init.py could be fixed without affecting 1.5.2 compatibility. Should the above uses be fixed, too? --amk
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] 2.5: uses of sys.exc_type, exc_value
- Next message: [Python-Dev] New miniconf module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]