Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-127937: deprecate _PyLong_FromDigits() function #127939

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading