Skip to content

Commit cddac40

Browse files
committed
Add pyunicodewriter ref in the doc
1 parent 924cd95 commit cddac40

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

‎Doc/c-api/unicode.rst‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,10 +1697,12 @@ They all return ``NULL`` or ``-1`` if an exception occurs.
16971697
intern-related details, may change between CPython versions.
16981698
16991699
1700+
.. _pyunicodewriter:
1701+
17001702
PyUnicodeWriter
17011703
^^^^^^^^^^^^^^^
17021704
1703-
The :c:type:`PyUnicodeWriter` API can be used to create a Python :class:`str`
1705+
The ``PyUnicodeWriter`` API can be used to create a Python :class:`str`
17041706
object.
17051707
17061708
.. versionadded:: 3.14
@@ -1916,7 +1918,7 @@ then filling in its contents.
19161918
They are :term:`soft deprecated`: they break the assumption that
19171919
strings are immutable, making them hard to use correctly.
19181920
1919-
Prefer using the :c:type:`PyUnicodeWriter` API,
1921+
Prefer using the :ref:`PyUnicodeWriter API <pyunicodewriter>`,
19201922
or one of the ``PyUnicode_From*``
19211923
functions such as :c:func:`PyUnicode_FromStringAndSize`.
19221924
@@ -1971,7 +1973,7 @@ Python does not always check these requirements.
19711973
.. versionadded:: 3.3
19721974
19731975
.. soft-deprecated:: 3.16
1974-
Use the :c:type:`PyUnicodeWriter` API instead.
1976+
Use the :ref:`PyUnicodeWriter API <pyunicodewriter>` instead.
19751977
19761978
19771979
.. c:function:: Py_ssize_t PyUnicode_CopyCharacters(PyObject *to, \
@@ -1991,7 +1993,7 @@ Python does not always check these requirements.
19911993
.. versionadded:: 3.3
19921994
19931995
.. soft-deprecated:: 3.16
1994-
Use the :c:type:`PyUnicodeWriter` API instead.
1996+
Use the :ref:`PyUnicodeWriter API <pyunicodewriter>` instead.
19951997
19961998
19971999
.. c:function:: int PyUnicode_Resize(PyObject **unicode, Py_ssize_t length);
@@ -2012,7 +2014,7 @@ Python does not always check these requirements.
20122014
See :ref:`pyunicode-new-mutating` for details.
20132015
20142016
.. soft-deprecated:: 3.16
2015-
Use the :c:type:`PyUnicodeWriter` API instead.
2017+
Use the :ref:`PyUnicodeWriter API <pyunicodewriter>` instead.
20162018
20172019
20182020
.. c:function:: Py_ssize_t PyUnicode_Fill(PyObject *unicode, Py_ssize_t start, \
@@ -2033,7 +2035,7 @@ Python does not always check these requirements.
20332035
.. versionadded:: 3.3
20342036
20352037
.. soft-deprecated:: 3.16
2036-
Use the :c:type:`PyUnicodeWriter` API instead.
2038+
Use the :ref:`PyUnicodeWriter API <pyunicodewriter>` instead.
20372039
20382040
20392041
.. c:function:: int PyUnicode_WriteChar(PyObject *unicode, Py_ssize_t index, \
@@ -2053,4 +2055,4 @@ Python does not always check these requirements.
20532055
.. versionadded:: 3.3
20542056
20552057
.. soft-deprecated:: 3.16
2056-
Use the :c:type:`PyUnicodeWriter` API instead.
2058+
Use the :ref:`PyUnicodeWriter API <pyunicodewriter>` instead.

‎Doc/whatsnew/3.14.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2990,7 +2990,7 @@ New features in the C API
29902990
The function is also added to the Limited C API.
29912991
(Contributed by Victor Stinner in :gh:`124502`.)
29922992

2993-
* Add a new :c:type:`PyUnicodeWriter` API to create a Python :class:`str`
2993+
* Add a new :ref:`PyUnicodeWriter API <pyunicodewriter>` to create a Python :class:`str`
29942994
object, with the following functions:
29952995

29962996
* :c:func:`PyUnicodeWriter_Create`

‎Doc/whatsnew/3.16.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ New features
13841384
API.
13851385
(Contributed by Nathan Goldbaum and Victor Stinner in :gh:`158842`.)
13861386

1387-
* Add the :ref:`PyUnicodeWriter API <PyUnicodeWriter>` to the limited C API.
1387+
* Add the :ref:`PyUnicodeWriter API <pyunicodewriter>` to the limited C API.
13881388
(Contributed by Victor Stinner in :gh:`161172`.)
13891389

13901390
Porting to Python 3.16
@@ -1434,7 +1434,7 @@ Deprecated C APIs
14341434
:c:func:`PyUnicode_New`, :c:func:`PyUnicode_CopyCharacters`,
14351435
:c:func:`PyUnicode_Fill`, :c:func:`PyUnicode_Resize`,
14361436
:c:func:`PyUnicode_WRITE` and :c:func:`PyUnicode_WriteChar`.
1437-
Use the safer :c:type:`PyUnicodeWriter` API instead.
1437+
Use the safer :ref:`PyUnicodeWriter API <pyunicodewriter>` instead.
14381438
(Contributed by Victor Stinner in :gh:`157710`.)
14391439

14401440
.. Add C API deprecations above alphabetically, not here at the end.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Add the :ref:`PyUnicodeWriter API <PyUnicodeWriter>` to the limited C API.
1+
Add the :ref:`PyUnicodeWriter API <pyunicodewriter>` to the limited C API.
22
Patch by Victor Stinner.

0 commit comments

Comments
 (0)