https://github.com/python/cpython/commit/4c1d52934da853cdf42cf735689bae62d66c193e
commit: 4c1d52934da853cdf42cf735689bae62d66c193e
branch: 3.12
author: Hugo van Kemenade <1324225+hug...@users.noreply.github.com>
committer: hugovk <1324225+hug...@users.noreply.github.com>
date: 2025-03-17T14:59:12+02:00
summary:

[3.12] gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386) 
(#130549)

(cherry picked from commit 425587a110eb214a097c634d4b6d944ac478923e)

Co-authored-by: Petr Viktorin <encu...@gmail.com>

files:
M Doc/c-api/long.rst

diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 972d69a5194511..6e1cd1ece850e5 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -135,6 +135,16 @@ distinguished from a number.  Use :c:func:`PyErr_Occurred` 
to disambiguate.
    .. versionchanged:: 3.10
       This function will no longer use :meth:`~object.__int__`.
 
+   .. c:namespace:: NULL
+
+   .. c:function:: long PyLong_AS_LONG(PyObject *obj)
+
+      A :term:`soft deprecated` alias.
+      Exactly equivalent to the preferred ``PyLong_AsLong``. In particular,
+      it can fail with :exc:`OverflowError` or another exception.
+
+      .. deprecated:: 3.14
+         The function is soft deprecated.
 
 .. c:function:: long PyLong_AsLongAndOverflow(PyObject *obj, int *overflow)
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to