Skip to content

Commit c208106

Browse files
methaneadorilson
authored andcommitted
bpo-36346: Document removal schedule of deprecate APIs (pythonGH-20879)
We will remove wstr cache in Python 3.12. See PEP 623.
1 parent 25fb3b6 commit c208106

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Doc/c-api/arg.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ which disallows mutable objects such as :class:`bytearray`.
149149
Previously, :exc:`TypeError` was raised when embedded null code points
150150
were encountered in the Python string.
151151

152-
.. deprecated-removed:: 3.3 4.0
152+
.. deprecated-removed:: 3.3 3.12
153153
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
154154
:c:func:`PyUnicode_AsWideCharString`.
155155

@@ -158,23 +158,23 @@ which disallows mutable objects such as :class:`bytearray`.
158158
Unicode data buffer, the second one its length. This variant allows
159159
null code points.
160160

161-
.. deprecated-removed:: 3.3 4.0
161+
.. deprecated-removed:: 3.3 3.12
162162
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
163163
:c:func:`PyUnicode_AsWideCharString`.
164164

165165
``Z`` (:class:`str` or ``None``) [const Py_UNICODE \*]
166166
Like ``u``, but the Python object may also be ``None``, in which case the
167167
:c:type:`Py_UNICODE` pointer is set to ``NULL``.
168168

169-
.. deprecated-removed:: 3.3 4.0
169+
.. deprecated-removed:: 3.3 3.12
170170
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
171171
:c:func:`PyUnicode_AsWideCharString`.
172172

173173
``Z#`` (:class:`str` or ``None``) [const Py_UNICODE \*, :c:type:`Py_ssize_t`]
174174
Like ``u#``, but the Python object may also be ``None``, in which case the
175175
:c:type:`Py_UNICODE` pointer is set to ``NULL``.
176176

177-
.. deprecated-removed:: 3.3 4.0
177+
.. deprecated-removed:: 3.3 3.12
178178
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
179179
:c:func:`PyUnicode_AsWideCharString`.
180180

Doc/c-api/unicode.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ points must be below 1114112 (which is the full Unicode range).
1919

2020
:c:type:`Py_UNICODE*` and UTF-8 representations are created on demand and cached
2121
in the Unicode object. The :c:type:`Py_UNICODE*` representation is deprecated
22-
and inefficient; it should be avoided in performance- or memory-sensitive
23-
situations.
22+
and inefficient.
2423

2524
Due to the transition between the old APIs and the new APIs, Unicode objects
2625
can internally be in two states depending on how they were created:
@@ -434,7 +433,7 @@ APIs:
434433
435434
If *u* is ``NULL``, this function behaves like :c:func:`PyUnicode_FromUnicode`
436435
with the buffer set to ``NULL``. This usage is deprecated in favor of
437-
:c:func:`PyUnicode_New`.
436+
:c:func:`PyUnicode_New`, and will be removed in Python 3.12.
438437
439438
440439
.. c:function:: PyObject *PyUnicode_FromString(const char *u)
@@ -676,7 +675,7 @@ APIs:
676675
Deprecated Py_UNICODE APIs
677676
""""""""""""""""""""""""""
678677
679-
.. deprecated-removed:: 3.3 4.0
678+
.. deprecated-removed:: 3.3 3.12
680679
681680
These API functions are deprecated with the implementation of :pep:`393`.
682681
Extension modules can continue using them, as they will not be removed in Python
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update some deprecated unicode APIs which are documented as "will be removed
2+
in 4.0" to "3.12". See :pep:`623` for detail.

0 commit comments

Comments
 (0)