gh-141004: soft-deprecate Py_INFINITY macro (#141033)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Sergey B Kirpichev 2025-11-12 15:44:49 +03:00 committed by GitHub
parent c6f3dd6a50
commit e2026731f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 45 additions and 36 deletions

View file

@ -105,7 +105,7 @@ The following functions provide locale-independent string to number conversions.
If ``s`` represents a value that is too large to store in a float
(for example, ``"1e500"`` is such a string on many platforms) then
if ``overflow_exception`` is ``NULL`` return ``Py_INFINITY`` (with
if ``overflow_exception`` is ``NULL`` return :c:macro:`!INFINITY` (with
an appropriate sign) and don't set any exception. Otherwise,
``overflow_exception`` must point to a Python exception object;
raise that exception and return ``-1.0``. In both cases, set

View file

@ -83,8 +83,11 @@ Floating-Point Objects
This macro expands a to constant expression of type :c:expr:`double`, that
represents the positive infinity.
On most platforms, this is equivalent to the :c:macro:`!INFINITY` macro from
the C11 standard ``<math.h>`` header.
It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard
``<math.h>`` header.
.. deprecated:: 3.15
The macro is soft deprecated.
.. c:macro:: Py_NAN