On Mon, Jun 29, 2020 at 6:51 PM Victor Stinner <vstinner@python.org> wrote:
I understand that these ".. deprecated" markups will be added to 3.8 and 3.9 documentation, right?
They are documented as "Deprecated since version 3.3, will be removed in version 4.0" already. I am proposing s/4.0/3.10/ in 3.8 and 3.9 documents.
For each function, I would be nice to suggest a replacement function. For example, PyUnicode_EncodeMBCS() (Py_UNICODE*) can be replaced with PyUnicode_EncodeCodePage() using code_page=CP_ACP (PyObject*).
Of course.
## PyUnicode_EncodeDecimal
It is not documented. It has not been deprecated by Py_DEPRECATED. Plan: Add Py_DEPRECATED in Python 3.9 and remove it in 3.11.
I understood that the replacement function is the private _PyUnicode_TransformDecimalAndSpaceToASCII() function. This function is used by complex, float and int types to convert a string into a number.
Should we make it public?
## _PyUnicode_ToLowercase, _PyUnicode_ToUppercase
They are not deprecated by PEP 393, but bpo-12736.
They are documented as deprecated, but don't have ``Py_DEPRECATED``.
Plan: Add Py_DEPRECATED in 3.9, and remove them in 3.11.
Note: _PyUnicode_ToTitlecase has Py_DEPRECATED. It can be removed in 3.10.
bpo-12736 is "Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation". IMHO the replacement function is to call lower() and method() of a Python str object.
We have private functions; _PyUnicode_ToTitleFull, _PyUnicode_ToLowerFull, and _PyUnicode_ToUpperFull. I am not sure we should make them public too.
If you change the 3.9 documentation, please also update 3.8 doc.
I see. -- Inada Naoki <songofacandy@gmail.com>