bpo-36346: Document removal schedule of deprecate APIs (GH-20879)
We will remove wstr cache in Python 3.12. See PEP 623.
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index a91b3c7..1d93b35 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -149,7 +149,7 @@
Previously, :exc:`TypeError` was raised when embedded null code points
were encountered in the Python string.
- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.
@@ -158,7 +158,7 @@
Unicode data buffer, the second one its length. This variant allows
null code points.
- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.
@@ -166,7 +166,7 @@
Like ``u``, but the Python object may also be ``None``, in which case the
:c:type:`Py_UNICODE` pointer is set to ``NULL``.
- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.
@@ -174,7 +174,7 @@
Like ``u#``, but the Python object may also be ``None``, in which case the
:c:type:`Py_UNICODE` pointer is set to ``NULL``.
- .. deprecated-removed:: 3.3 4.0
+ .. deprecated-removed:: 3.3 3.12
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
:c:func:`PyUnicode_AsWideCharString`.
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 1851c64..b603f58 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -19,8 +19,7 @@
:c:type:`Py_UNICODE*` and UTF-8 representations are created on demand and cached
in the Unicode object. The :c:type:`Py_UNICODE*` representation is deprecated
-and inefficient; it should be avoided in performance- or memory-sensitive
-situations.
+and inefficient.
Due to the transition between the old APIs and the new APIs, Unicode objects
can internally be in two states depending on how they were created:
@@ -434,7 +433,7 @@
If *u* is ``NULL``, this function behaves like :c:func:`PyUnicode_FromUnicode`
with the buffer set to ``NULL``. This usage is deprecated in favor of
- :c:func:`PyUnicode_New`.
+ :c:func:`PyUnicode_New`, and will be removed in Python 3.12.
.. c:function:: PyObject *PyUnicode_FromString(const char *u)
@@ -676,7 +675,7 @@
Deprecated Py_UNICODE APIs
""""""""""""""""""""""""""
-.. deprecated-removed:: 3.3 4.0
+.. deprecated-removed:: 3.3 3.12
These API functions are deprecated with the implementation of :pep:`393`.
Extension modules can continue using them, as they will not be removed in Python