Skip to content
6 changes: 6 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ Porting to Python 3.14
Deprecated
----------

* Macros :c:macro:`!Py_IS_NAN`, :c:macro:`!Py_IS_INFINITY`
and :c:macro:`!Py_IS_FINITE` are :term:`soft deprecated`,
use instead :c:macro:`!isnan`, :c:macro:`!isinf` and
:c:macro:`!isfinite` available from :file:`math.h`
since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)

Removed
-------

4 changes: 4 additions & 0 deletions Include/pymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#define Py_MATH_TAU 6.2831853071795864769252867665590057683943L
#endif

/* Py_IS_NAN, Py_IS_INFINITY and Py_IS_FINITE are deprecated
* since CPython 3.14.
*/

// Py_IS_NAN(X)
// Return 1 if float or double arg is a NaN, else 0.
#define Py_IS_NAN(X) isnan(X)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Macros ``Py_IS_NAN``, ``Py_IS_INFINITY`` and ``Py_IS_FINITE``
are :term:`soft deprecated`.