Nick Coghlan added the comment:

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.

----------
nosy: +ncoghlan

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22906>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to