bpo-41098: Doc: Add missing deprecated directives (GH-21162)
PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index e7805ba..b4722ff 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -637,11 +637,21 @@
*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are
UTF-8 encoded strings.
+ .. deprecated:: 3.3 3.11
+
+ ``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to
+ ``PyObject_CallFunction(PyExc_UnicodeEncodeError, "sOnns", ...)``.
+
.. c:function:: PyObject* PyUnicodeTranslateError_Create(const Py_UNICODE *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason)
Create a :class:`UnicodeTranslateError` object with the attributes *object*,
*length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string.
+ .. deprecated:: 3.3 3.11
+
+ ``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to
+ ``PyObject_CallFunction(PyExc_UnicodeTranslateError, "Onns", ...)``.
+
.. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc)
PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc)