[Python-Dev] deprecating APIs

Neal Norwitz neal@metaslash.com
Thu, 19 Dec 2002 09:53:46 -0500


On Wed, Dec 18, 2002 at 10:54:34PM -0500, Guido van Rossum wrote:
> 
> What does this do under GCC?  I suppose it issues a warning when you
> use the deprecated API?

I modified abstract.h:

-     PyAPI_FUNC(int) PyNumber_Check(PyObject *o);
+     PyAPI_FUNC(int) PyNumber_Check(PyObject *o) Py_DEPRECATED(2.3);

I used PyNumber_Check in selectmodule.c and got:

Modules/selectmodule.c: In function `select_select':
Modules/selectmodule.c:211: warning: `PyNumber_Check' is deprecated 
                                (declared at Include/abstract.h:534)

Neal