Neil Schemenauer wrote:
Neal Norwitz wrote:
Perhaps, we could wrap all deprecated functions/macros in:
#ifdef Py_DEPRECATED #endif
I like this idea. We could easily undefine it to ensure that the core code is not using deprecated APIs.
FYI, I have been using a mxpyapi.h header file for this the last couple of years (see e.g. mxDateTime). Perhaps Python should ship with one of these as well, e.g. pycompat.h.
This include file would only be used by extensions wishing to support older Python versions, of course, not by the Python core itself.