classification
Title: sys.exc_{type,values,traceback} needs a 2to3 fixer
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: benjamin.peterson, brett.cannon, collinwinter, georg.brandl, jackdied, jeff.balogh
Priority: release blocker Keywords: 26backport, needs review, patch

Created on 2008-03-17 19:38 by brett.cannon, last changed 2008-08-21 23:45 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
empty-arglist.diff jeff.balogh, 2008-03-18 23:10 diff against 61574
issue2357.diff jeff.balogh, 2008-03-18 23:14 diff against 61574
Messages (10)
msg63732 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-03-17 19:38
Using sys.exc_{type,values,traceback} should raise a Py3K warning.
msg63747 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-03-17 19:59
A fixer to use sys.exc_info is needed.
msg64012 - (view) Author: Jeff Balogh (jeff.balogh) * Date: 2008-03-18 23:10
Attaching a helper patch that allows an empty ArgList in lib2to3/fixes/
util.py, which is required by my next patch.
msg64013 - (view) Author: Jeff Balogh (jeff.balogh) * Date: 2008-03-18 23:14
Attaching a patch that provides fixers for sys.exc_
{type,value,traceback}
msg64082 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2008-03-19 18:47
Fixer patch works for me (both must be applied).

A 3k warning for accessing is harder - it would have to copy the module
type or dict type and supply a custom to_getattro that watches for
accesses to exc_(type|values|traceback).  I'll look into it.
msg64463 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-03-25 08:01
I'd say that since this is so easy for a fixer to spot and fix, no
convoluted effort to add a Py3k warning is necessary.  (The same goes
for sys.exitfunc, #2356).
msg64464 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-03-25 08:27
I agree with Georg; a 2to3 fixer is enough.
msg64469 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2008-03-25 08:47
+1, I'll burn my _apply_evil(ModuleObject *) function patch to
moduleobject.c which did a memcpy on a type object and several other
heresies.

On Tue, Mar 25, 2008 at 4:27 AM, Brett Cannon <report@bugs.python.org> wrote:
>
>  Brett Cannon <brett@python.org> added the comment:
>
>  I agree with Georg; a 2to3 fixer is enough.
>
>
>
>  __________________________________
>  Tracker <report@bugs.python.org>
>  <http://bugs.python.org/issue2357>
>  __________________________________
>
msg70465 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-07-31 02:02
Collin, can you review the 2to3 patch?
msg71703 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-08-21 23:45
Thanks for the work, Jeff! I reviewed the fixer, changed a few things,
added a few more tests, and committed it in r65968.
History
Date User Action Args
2008-08-21 23:45:22benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg71703
2008-08-21 20:33:23brett.cannonsetkeywords: + needs review
2008-08-21 18:34:56brett.cannonsetpriority: critical -> release blocker
2008-08-21 14:29:40benjamin.petersonsettitle: sys.exc_{type,values,traceback} should raise a Py3K warning -> sys.exc_{type,values,traceback} needs a 2to3 fixer
2008-07-31 02:02:08benjamin.petersonsetnosy: + benjamin.peterson, collinwinter
messages: + msg70465
components: + 2to3 (2.x to 3.x conversion tool), - Interpreter Core
assignee: collinwinter
2008-03-25 08:47:01jackdiedsetmessages: + msg64469
2008-03-25 08:27:36brett.cannonsetmessages: + msg64464
2008-03-25 08:01:26georg.brandlsetnosy: + georg.brandl
messages: + msg64463
2008-03-19 18:47:02jackdiedsetnosy: + jackdied
messages: + msg64082
2008-03-18 23:14:18jeff.baloghsetfiles: + issue2357.diff
messages: + msg64013
2008-03-18 23:10:09jeff.baloghsetfiles: + empty-arglist.diff
keywords: + patch
messages: + msg64012
nosy: + jeff.balogh
2008-03-17 20:17:58brett.cannonsetpriority: release blocker -> critical
2008-03-17 19:59:23brett.cannonsetmessages: + msg63747
2008-03-17 19:38:46brett.cannoncreate