File: c-api-pending-removal-in-3.18.rst

package info (click to toggle)
python3.14 3.14.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 126,824 kB
  • sloc: python: 745,274; ansic: 713,752; xml: 31,250; sh: 5,822; cpp: 4,063; makefile: 1,988; objc: 787; lisp: 502; javascript: 136; asm: 75; csh: 12
file content (45 lines) | stat: -rw-r--r-- 2,523 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Pending removal in Python 3.18
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* Deprecated private functions (:gh:`128863`):

  * :c:func:`!_PyBytes_Join`: use :c:func:`PyBytes_Join`.
  * :c:func:`!_PyDict_GetItemStringWithError`: use :c:func:`PyDict_GetItemStringRef`.
  * :c:func:`!_PyDict_Pop()`: :c:func:`PyDict_Pop`.
  * :c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`.
  * :c:func:`!_PyLong_FromDigits` and :c:func:`!_PyLong_New`:
    use :c:func:`PyLongWriter_Create`.
  * :c:func:`!_PyThreadState_UncheckedGet`: use :c:func:`PyThreadState_GetUnchecked`.
  * :c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`.
  * :c:func:`!_PyUnicodeWriter_Init`:
    replace ``_PyUnicodeWriter_Init(&writer)`` with
    :c:func:`writer = PyUnicodeWriter_Create(0) <PyUnicodeWriter_Create>`.
  * :c:func:`!_PyUnicodeWriter_Finish`:
    replace ``_PyUnicodeWriter_Finish(&writer)`` with
    :c:func:`PyUnicodeWriter_Finish(writer) <PyUnicodeWriter_Finish>`.
  * :c:func:`!_PyUnicodeWriter_Dealloc`:
    replace ``_PyUnicodeWriter_Dealloc(&writer)`` with
    :c:func:`PyUnicodeWriter_Discard(writer) <PyUnicodeWriter_Discard>`.
  * :c:func:`!_PyUnicodeWriter_WriteChar`:
    replace ``_PyUnicodeWriter_WriteChar(&writer, ch)`` with
    :c:func:`PyUnicodeWriter_WriteChar(writer, ch) <PyUnicodeWriter_WriteChar>`.
  * :c:func:`!_PyUnicodeWriter_WriteStr`:
    replace ``_PyUnicodeWriter_WriteStr(&writer, str)`` with
    :c:func:`PyUnicodeWriter_WriteStr(writer, str) <PyUnicodeWriter_WriteStr>`.
  * :c:func:`!_PyUnicodeWriter_WriteSubstring`:
    replace ``_PyUnicodeWriter_WriteSubstring(&writer, str, start, end)`` with
    :c:func:`PyUnicodeWriter_WriteSubstring(writer, str, start, end) <PyUnicodeWriter_WriteSubstring>`.
  * :c:func:`!_PyUnicodeWriter_WriteASCIIString`:
    replace ``_PyUnicodeWriter_WriteASCIIString(&writer, str)`` with
    :c:func:`PyUnicodeWriter_WriteUTF8(writer, str) <PyUnicodeWriter_WriteUTF8>`.
  * :c:func:`!_PyUnicodeWriter_WriteLatin1String`:
    replace ``_PyUnicodeWriter_WriteLatin1String(&writer, str)`` with
    :c:func:`PyUnicodeWriter_WriteUTF8(writer, str) <PyUnicodeWriter_WriteUTF8>`.
  * :c:func:`!_PyUnicodeWriter_Prepare`: (no replacement).
  * :c:func:`!_PyUnicodeWriter_PrepareKind`: (no replacement).
  * :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`.
  * :c:func:`!_Py_fopen_obj`: use :c:func:`Py_fopen`.

  The `pythoncapi-compat project
  <https://github.com/python/pythoncapi-compat/>`__ can be used to get these
  new public functions on Python 3.13 and older.