mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-142217: Recommend PyUnicode_InternFromString() to replace _PyUnicode_FromId() (GH-142746)
This commit is contained in:
parent
cd2ca74c53
commit
14d3974db0
3 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ Pending removal in Python 3.20
|
|||
|
||||
* :c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and
|
||||
:c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in
|
||||
3.20. Instead, use :c:func:`PyUnicode_FromString()` and cache the result in
|
||||
3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in
|
||||
the module state, then call :c:func:`PyObject_CallMethod` or
|
||||
:c:func:`PyObject_GetAttr`.
|
||||
(Contributed by Victor Stinner in :gh:`141049`.)
|
||||
|
|
|
|||
|
|
@ -1226,7 +1226,7 @@ Deprecated C APIs
|
|||
|
||||
* :c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and
|
||||
:c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in
|
||||
3.20. Instead, use :c:func:`PyUnicode_FromString()` and cache the result in
|
||||
3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in
|
||||
the module state, then call :c:func:`PyObject_CallMethod` or
|
||||
:c:func:`PyObject_GetAttr`.
|
||||
(Contributed by Victor Stinner in :gh:`141049`.)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
:c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and
|
||||
:c:func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in
|
||||
3.20. Instead, use :c:func:`PyUnicode_FromString()` and cache the result in
|
||||
3.20. Instead, use :c:func:`PyUnicode_InternFromString()` and cache the result in
|
||||
the module state, then call :c:func:`PyObject_CallMethod` or
|
||||
:c:func:`PyObject_GetAttr`. Patch by Victor Stinner.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue