diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-08-07 07:49:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 07:49:53 (GMT) |
commit | b2514c4934291364404a2bc78256b77026a80dff (patch) | |
tree | cb668a807c0949605d606c8881b03d96d3212c8b /Doc/c-api/exceptions.rst | |
parent | fc354ca51d0b6f24f2871788dfa7e35c56129f8b (diff) | |
download | cpython-b2514c4934291364404a2bc78256b77026a80dff.zip cpython-b2514c4934291364404a2bc78256b77026a80dff.tar.gz cpython-b2514c4934291364404a2bc78256b77026a80dff.tar.bz2 |
bpo-41098: Doc: Add missing deprecated directives (GH-21162)
PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.
(cherry picked from commit 46e19b61d31ba99f049258efa4ff1334856a3643)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Diffstat (limited to 'Doc/c-api/exceptions.rst')
-rw-r--r-- | Doc/c-api/exceptions.rst | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ The following functions are used to create and modify Unicode exceptions from C. *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) |