This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Rosuav, belopolsky, gvanrossum, ncoghlan, python-dev, r.david.murray, rhettinger, schlamar, scoder, serhiy.storchaka, vstinner
Date 2015-01-08.03:33:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420687999.86.0.987047485408.issue22906@psf.upfronthosting.co.za>
In-reply-to
Content
As Stefan noted, the leading underscore on "_PyErr_ChainExceptions" is just a warning to third party users that we don't yet offer any API stability guarantees for it. Using it in CPython itself is entirely appropriate - that's the whole reason for exposing it to the linker at all.

It would be good to have a public API for that functionality though, so I filed issue 23188 to suggest making it public.

The main thing missing from the patch at this point is the __future__ import. To learn what's involved in that, one of the useful tricks is to look at the annotated __future__ module: https://hg.python.org/cpython/annotate/bbf16fd024df/Lib/__future__.py

The commits adding new flags there highlight the various places that tend to be affected when a new __future__ import is added. For this particular case, the closest comparison is likely with the "absolute import" feature. One interesting aspect of this particular flag though is that it doesn't really affect compilation at all, aside from setting the flag on the code objects to indicate the future statement was in effect. The main impact will be at runtime, where it will make the exception replacement in Chris's PoC patch conditional on the presence of the flag on the code object.

Chris, will you have time in the near future to rework the patch to add the __future__ support? It would be good to get this into 3.5a1 to give it the longest possible settling in period.
History
Date User Action Args
2015-01-08 03:33:20ncoghlansetrecipients: + ncoghlan, gvanrossum, rhettinger, belopolsky, scoder, vstinner, r.david.murray, python-dev, schlamar, Rosuav, serhiy.storchaka
2015-01-08 03:33:19ncoghlansetmessageid: <1420687999.86.0.987047485408.issue22906@psf.upfronthosting.co.za>
2015-01-08 03:33:19ncoghlanlinkissue22906 messages
2015-01-08 03:33:18ncoghlancreate