<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 30 Dec 2016, at 15:33, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com" class="">ncoghlan@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On 29 December 2016 at 06:41, Steve Dower<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:steve.dower@python.org" target="_blank" class="">steve.dower@python.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">On 28Dec2016 1145, Brett Cannon wrote:<br class=""></span><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">On Tue, 27 Dec 2016 at 12:15 Ronald Oussoren <<a href="mailto:ronaldoussoren@mac.com" target="_blank" class="">ronaldoussoren@mac.com</a><br class=""></span><span class=""><mailto:<a href="mailto:ronaldoussoren@mac.com" target="_blank" class="">ronaldoussoren@mac.com</a><wbr class="">>> wrote:<br class="">   <span class="Apple-converted-space"> </span>A directive would make it easier to ensure that the text about the<br class="">   <span class="Apple-converted-space"> </span>stable API is consistent.  I’d also consider adding that directive<br class="">   <span class="Apple-converted-space"> </span>to all API’s that *are* part of the stable API instead of the other<br class="">   <span class="Apple-converted-space"> </span>way around (that would also require changes to …/stable.html). That<br class="">   <span class="Apple-converted-space"> </span>would have two advantages: firstly it makes it easier to document<br class="">   <span class="Apple-converted-space"> </span>from which version an API is part of the stable ABI, and secondly<br class="">   <span class="Apple-converted-space"> </span>forgetting the annotation would imply that an API is not part of the<br class="">   <span class="Apple-converted-space"> </span>stable ABI instead of accidentally claiming to increase the stable ABI.<br class=""><br class=""><br class="">I like Ronald's suggestion of both using a directive and making it for<br class="">the stable ABI since it should be an opt-in thing for the API to be<br class="">stable instead of opt-out.<br class=""></span></blockquote><br class="">The directive is a good idea, but I'm a little concerned about the stable API being opt-out in the headers and opt-in in the documentation.<br class=""><br class="">Perhaps we should also figure out the preprocessor gymnastics we need to make it opt-in in the headers too? Though once we get the build validation to detect when the stable API changes accidentally it'll be less of an issue.<br class=""></blockquote><div class=""><br class=""></div></div>Making it opt-in in the documentation could make the build validation easier: check the list from the *docs* against the actual symbols being exported by the headers.<br class=""><br class=""></div><div class="gmail_extra">That would have a few benefits:<br class=""><br class=""></div><div class="gmail_extra">- if you accidentally add a new function to the stable ABI, you get a test failure<br class=""></div><div class="gmail_extra">- if you deliberately add a new function to the stable ABI, but forget to document it as such, you get a test failure<br class=""></div><div class="gmail_extra">- if the stable ABI version added directive in the docs doesn't match the stable ABI version used in the headers, you get a test failure<br class=""><br class=""></div><div class="gmail_extra">(That suggests the tests would need to check the headers with all stable ABI versions from 3.2 up to the current release and ensure they match the current C API documentation)<br class=""></div></div></div></blockquote><div><br class=""></div>This is probably a lot easier than trying to coax the headers into defining symbols as not part of the stable API by default (“opt-in”), especially when trying to do so in a portable way.  With GCC and clang it seems to be possible to use function attributes to force compile time errors when using functions not in the limited API, but that wouldn’t work for other declarations (struct definitions, …) and still is error prone.</div><div><br class=""></div><div>Ronald</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra">Cheers,<br class=""></div><div class="gmail_extra">Nick.<br clear="all" class=""></div><div class="gmail_extra"><br class="">--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature" data-smartmail="gmail_signature">Nick Coghlan   |  <span class="Apple-converted-space"> </span><a href="mailto:ncoghlan@gmail.com" target="_blank" class="">ncoghlan@gmail.com</a>   |   Brisbane, Australia</div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Python-Dev mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Python-Dev@python.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Python-Dev@python.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://mail.python.org/mailman/listinfo/python-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mail.python.org/mailman/listinfo/python-dev</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Unsubscribe:<span class="Apple-converted-space"> </span></span><a href="https://mail.python.org/mailman/options/python-dev/ronaldoussoren%40mac.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mail.python.org/mailman/options/python-dev/ronaldoussoren%40mac.com</a></div></blockquote></div><br class=""></body></html>