Message195586
Under python 2 when an atexit callback raised an exception the full traceback was displayed. Under python 3, only the summary of the exception is shown. Input file: import atexit def exit_with_exception(message): raise RuntimeError(message) atexit.register(exit_with_exception, 'Registered first') atexit.register(exit_with_exception, 'Registered second') Python 2: $ python2.7 source/atexit/atexit_exception.py Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "source/atexit/atexit_exception.py", line 36, in exit_with_exception raise RuntimeError(message) RuntimeError: Registered second Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "source/atexit/atexit_exception.py", line 36, in exit_with_exception raise RuntimeError(message) RuntimeError: Registered first Error in sys.exitfunc: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "source/atexit/atexit_exception.py", line 36, in exit_with_exception raise RuntimeError(message) RuntimeError: Registered first Python 3: $ python3.3 source/atexit/atexit_exception.py Error in atexit._run_exitfuncs: RuntimeError: Registered second Error in atexit._run_exitfuncs: RuntimeError: Registered first | |
| Date | User | Action | Args | | 2013-08-18 23:07:59 | doughellmann | set | recipients: + doughellmann | | 2013-08-18 23:07:59 | doughellmann | set | messageid: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za> | | 2013-08-18 23:07:59 | doughellmann | link | issue18776 messages | | 2013-08-18 23:07:59 | doughellmann | create | | |