mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141004: Deprecate Py_MATH_El and Py_MATH_PIl macros (#141035)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
55ea132313
commit
88953d5deb
5 changed files with 23 additions and 0 deletions
|
|
@ -78,6 +78,20 @@ Floating-Point Objects
|
||||||
Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`.
|
Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`.
|
||||||
|
|
||||||
|
|
||||||
|
.. c:macro:: Py_MATH_El
|
||||||
|
|
||||||
|
High precision (long double) definition of :data:`~math.e` constant.
|
||||||
|
|
||||||
|
.. deprecated-removed:: 3.15 3.20
|
||||||
|
|
||||||
|
|
||||||
|
.. c:macro:: Py_MATH_PIl
|
||||||
|
|
||||||
|
High precision (long double) definition of :data:`~math.pi` constant.
|
||||||
|
|
||||||
|
.. deprecated-removed:: 3.15 3.20
|
||||||
|
|
||||||
|
|
||||||
.. c:macro:: Py_RETURN_NAN
|
.. c:macro:: Py_RETURN_NAN
|
||||||
|
|
||||||
Return :data:`math.nan` from a function.
|
Return :data:`math.nan` from a function.
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,5 @@ Pending removal in Python 3.20
|
||||||
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
|
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
|
||||||
to convert a Python complex number to/from the C :c:type:`Py_complex`
|
to convert a Python complex number to/from the C :c:type:`Py_complex`
|
||||||
representation.
|
representation.
|
||||||
|
|
||||||
|
* Macros :c:macro:`!Py_MATH_PIl` and :c:macro:`!Py_MATH_El`.
|
||||||
|
|
|
||||||
|
|
@ -1076,6 +1076,10 @@ Deprecated C APIs
|
||||||
since 3.15 and will be removed in 3.17.
|
since 3.15 and will be removed in 3.17.
|
||||||
(Contributed by Nikita Sobolev in :gh:`136355`.)
|
(Contributed by Nikita Sobolev in :gh:`136355`.)
|
||||||
|
|
||||||
|
* :c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are deprecated
|
||||||
|
since 3.15 and will be removed in 3.20.
|
||||||
|
(Contributed by Sergey B Kirpichev in :gh:`141004`.)
|
||||||
|
|
||||||
|
|
||||||
.. Add C API deprecations above alphabetically, not here at the end.
|
.. Add C API deprecations above alphabetically, not here at the end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
/* High precision definition of pi and e (Euler)
|
/* High precision definition of pi and e (Euler)
|
||||||
* The values are taken from libc6's math.h.
|
* The values are taken from libc6's math.h.
|
||||||
*/
|
*/
|
||||||
|
// Deprecated since Python 3.15.
|
||||||
#ifndef Py_MATH_PIl
|
#ifndef Py_MATH_PIl
|
||||||
#define Py_MATH_PIl 3.1415926535897932384626433832795029L
|
#define Py_MATH_PIl 3.1415926535897932384626433832795029L
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -14,6 +15,7 @@
|
||||||
#define Py_MATH_PI 3.14159265358979323846
|
#define Py_MATH_PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Deprecated since Python 3.15.
|
||||||
#ifndef Py_MATH_El
|
#ifndef Py_MATH_El
|
||||||
#define Py_MATH_El 2.7182818284590452353602874713526625L
|
#define Py_MATH_El 2.7182818284590452353602874713526625L
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
:c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are deprecated.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue