Skip to content

Commit

Permalink
gh-127937: deprecate _PyLong_FromDigits() function
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Dec 14, 2024
1 parent 2de048c commit 98242b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Doc/deprecations/c-api-pending-removal-in-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ although there is currently no date scheduled for their removal.
* :c:member:`!PyBytesObject.ob_shash` member:
call :c:func:`PyObject_Hash` instead.
* :c:member:`!PyDictObject.ma_version_tag` member.
* :c:func::c:func:`!_PyLong_FromDigits`
Use instead :c:struct:`PyLongWriter` API.
* Thread Local Storage (TLS) API:

* :c:func:`PyThread_create_key`:
Expand Down
2 changes: 1 addition & 1 deletion Include/cpython/longintrepr.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ PyAPI_FUNC(PyLongObject*) _PyLong_New(Py_ssize_t);
// Return a copy of src.
PyAPI_FUNC(PyObject*) _PyLong_Copy(PyLongObject *src);

PyAPI_FUNC(PyLongObject*) _PyLong_FromDigits(
Py_DEPRECATED(3.14) PyAPI_FUNC(PyLongObject*) _PyLong_FromDigits(
int negative,
Py_ssize_t digit_count,
digit *digits);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Deprecate the :c:func:`!_PyLong_FromDigits`, use instead
:c:struct:`PyLongWriter` API. Patch by Sergey B Kirpichev.

0 comments on commit 98242b4

Please sign in to comment.