[issue28410] Add convenient C API for "raise ... from ..."

2016-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ _

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 969c8bfe8872 by Serhiy Storchaka in branch '3.6': Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising https://hg.python.org/cpython/rev/969c8bfe8872 New changeset 2119cb0beace by Serhiy Storchaka in branch 'default': Issue #28410:

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81666d3e4a37 by Serhiy Storchaka in branch '3.5': Issue #28410: Keep the traceback of original exception in _PyErr_ChainExceptions(). https://hg.python.org/cpython/rev/81666d3e4a37 New changeset 23a1d9ec35d5 by Serhiy Storchaka in branch '3.6': Iss

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 23188 (referenced above) covers making this a public API for 3.7. I think it's a good idea, but it's too late to add it to 3.6, and getting the documentation right is going to require some discussion (as using this new API isn't necessary if you're already

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure about the function name. Does anybody want to suggest better name? -- ___ Python tracker ___

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Emanuel Barry
Emanuel Barry added the comment: I see the function is private; is there any concern with extending the PyErr_* API? I think it'd make sense to expose it, since it's a convenient way to do in C what can already be done easily in Python, but I don't actually have a good reason :) Other than th

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I have read and executed the tests and for me the patch is good. -- nosy: +matrixise ___ Python tracker ___ ___

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Nick Coghlan
Nick Coghlan added the comment: The patch looks good to me Serhiy, but I don't think it makes sense to apply this to 3.5 - it touches quite a few places in the code, and there's no reason to risk introducing a regression into a 3.5 maintenance release for a pure maintainer convenience function

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed error message in tests. -- Added file: http://bugs.python.org/file45132/_PyErr_FormatFromCause-2.patch ___ Python tracker ___ __

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45128/_PyErr_FormatFromCause-3.5.patch ___ Python tracker ___ ___ Python-

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know how it is related to issue23188. Maybe solving issue23188 will make _PyErr_ChainExceptions and the function proposed in this issue redundant. Or will make them simpler. But it looks to me that issue23188 is far from the completion. --

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: Serhiy, how does this version compare/relate to the previous discussion in http://bugs.python.org/issue23188 ? -- nosy: +ncoghlan ___ Python tracker

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Sometimes after catching an exception we need to raise new exception of specific type, but save the information about current exception. In Python the syntax "raise ... from ..." serves this purpose (PEP 3134). But in C the code that implements this is too