[issue2356] fixer for sys.exitfunc -> atexit

Benjamin Peterson report at bugs.python.org
Mon Aug 25 21:53:00 CEST 2008


Benjamin Peterson <musiccomposition at gmail.com> added the comment:

Here's my 2to3 fixer for the cause. It always changes assignment to
sys.exitfunc to atexit.register. It then inserts a "import atexit" after
the module's sys import. If it can't find a sys import (that should be
rare obviously :) ), it emits a warning.

----------
assignee:  -> collinwinter
components: +2to3 (2.x to 3.0 conversion tool) -Interpreter Core
keywords: +needs review, patch -26backport
nosy: +collinwinter
title: sys.exitfunc should raise a Py3K warning -> fixer for sys.exitfunc -> atexit
type:  -> feature request
Added file: http://bugs.python.org/file11252/atexit_fixer.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2356>
_______________________________________


More information about the Python-bugs-list mailing list