On Tue, 2 Jun 2015 21:09:52 +0200 Petr Viktorin <encu...@gmail.com> wrote: > On Mon, Jun 1, 2015 at 6:00 PM, Antoine Pitrou <solip...@pitrou.net> wrote: > [...] > > I think we have been laxist with additions to the stable ABI: > > apparently, they should be conditioned on the API version requested by > > the user. For example, in pystate.h: > > > > #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 > > /* New in 3.3 */ > > PyAPI_FUNC(int) PyState_AddModule(PyObject*, struct PyModuleDef*); > > PyAPI_FUNC(int) PyState_RemoveModule(struct PyModuleDef*); > > #endif > > > > (those were added by Martin, so I assume he knew what he was doing :-)) > > > > This way, failing to restrict yourself to a given API version fails at > > compile time, not at runtime. However, it's also more work to do so > > when adding stuff, which is why we tend to skimp on it. > > I see! I completely missed that memo. > I filed a patch that wraps my 3.5 additions as issue 24365. > > I think this should be in the PEP, so people like me can find it. Does > the attached wording look good?
It looks good to me, but Martin should probably validate it. If he hasn't answered yet in one month, perhaps you can add it anyway :) Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com