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

2012-04-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: The documentation does not explain how this new API is different from PyErr_Fetch/PyErr_Restore. In particular the documentation doesn't mention that PyErr_Fetch and PyErr_GetExcInfo access different bits of the error state (curexc_* vs. exc_* in the thread

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

2012-04-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thanks for the patch! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ P

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

2012-04-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9fdec1354af4 by Martin v. Löwis in branch 'default': Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo. http://hg.python.org/cpython/rev/9fdec1354af4 -- nosy: +python-dev ___ Python track

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

2012-04-10 Thread Stefan Behnel
Stefan Behnel added the comment: Done. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

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

2012-04-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: Fine with me as well. Stefan, please submit a contributor form. -- ___ Python tracker ___ ___ Pyth

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

2012-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Stefan's latest patch looks fine to me. -- nosy: +pitrou stage: -> commit review ___ Python tracker ___ __

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

2012-04-01 Thread Stefan Behnel
Stefan Behnel added the comment: This is now implemented in PyPy: https://bitbucket.org/pypy/pypy/changeset/623bcea85df3 Are there any objections to applying the equivalent patch to CPython? -- ___ Python tracker

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

2012-03-05 Thread Stefan Behnel
Changes by Stefan Behnel : Added file: http://bugs.python.org/file24734/pyerr_getexcinfo.patch ___ Python tracker ___ ___ Python-bugs-list mai

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

2012-02-23 Thread Stefan Behnel
Changes by Stefan Behnel : -- keywords: +patch Added file: http://bugs.python.org/file24613/exc_info_capi.patch ___ Python tracker ___ ___

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

2012-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: Writing up a test case, I noticed that it makes sense to let PyErr_SetExcInfo() steal the references. This matches the main use case of saving and restoring the fields. For the getter, it's still best to return new references in order to support the use case o

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

2012-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: I wonder if these functions should have an error return value, i.e. return -1 on failure. They'd "never" fail in CPython, but other implementations may want to report failures, in case their internal implementation is more involved. OTOH, documenting that they

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

2012-02-22 Thread Stefan Behnel
New submission from Stefan Behnel : 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 add