classification
Title: Deprecating PyUnicodeTranslateError_Create
Type: Stage:
Components: C API Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: inada.naoki
Priority: normal Keywords:

Created on 2020-06-24 08:51 by inada.naoki, last changed 2020-06-26 01:56 by inada.naoki.

Messages (3)
msg372242 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2020-06-24 08:51
PyUnicodeTranslateError_Create marked as Py_DEPRECATED since it receives  Py_UNICODE* as an argument.
But it is not deprecated in the document.

On the other hand, we have alternative private API which accepts Unicode object: _PyUnicodeTranslateError_Create.  Should we make it public?

Otherwise, we can recommend `PyObject_CallFunction(PyExc_UnicodeTranslateError, ...)` as an alternative.
msg372401 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2020-06-26 01:49
I prefer `PyObject_CallFunction(PyExc_UnicodeTranslateError, ...)` because  UnicodeTranslateError is not so popular for third party libraries.
I don't think we should provide public stable API for convenient.
msg372403 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2020-06-26 01:56
I added deprecated directive in GH-21162.
History
Date User Action Args
2020-06-26 01:56:53inada.naokisetmessages: + msg372403
2020-06-26 01:49:50inada.naokisetmessages: + msg372401
2020-06-24 08:51:17inada.naokicreate