[Python-Dev] deprecating APIs

Guido van Rossum guido@python.org
Thu, 19 Dec 2002 09:59:10 -0500


> > 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)

Neat!  +1.

Now it's time to make a list of APIs we want to declare deprecated.
(Some have probably been deprecated for quite a while...)

--Guido van Rossum (home page: http://www.python.org/~guido/)