[New-bugs-announce] [issue14098] provide public C-API for reading/setting sys.exc_info()

Stefan Behnel report at bugs.python.org
Thu Feb 23 08:58:41 CET 2012


New submission from Stefan Behnel <scoder at users.sourceforge.net>:

Following up on recent mailing list threads on pypy-dev and python-dev, this is a request for adding a public C-API to read and write the sys.exc_info() fields, currently stored in tstate->exc_*.

While not of major interest for CPython itself, this C-API addition would allow other Python implementations (currently PyPy) to hide their internal representation of these fields and to allow extensions that need to access them (most notably those generated by the Cython compiler) to write portable code.

Martin von Löwis proposed the names PyErr_GetExcInfo() and PyErr_SetExcInfo(), making them simple getter and setter functions that operate on owned references.

http://thread.gmane.org/gmane.comp.python.devel/129787/focus=129792

I'm currently working on a patch for CPython 3.3.

----------
components: Interpreter Core
messages: 154052
nosy: loewis, scoder
priority: normal
severity: normal
status: open
title: provide public C-API for reading/setting sys.exc_info()
type: enhancement
versions: Python 3.3

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


More information about the New-bugs-announce mailing list