Uncomment Py_DEPRECATED for Py_UNICODE APIs (GH-21318)
PyUnicode_EncodeDecimal and PyUnicode_TransformDecimalToASCII
are deprecated since Python 3.3.
But Py_DEPRECATED(3.3) was commented out.
(cherry picked from commit 13c90e82b6a1c3baff7f48f1bdc38058f6072f04)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index c92a71a..b2d070c 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2024,6 +2024,10 @@
return Py_BuildValue("(Nn)", to_copy, copied);
}
+/* Ignore use of deprecated APIs */
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
+
static PyObject *
unicode_encodedecimal(PyObject *self, PyObject *args)
{
@@ -2069,10 +2073,6 @@
return PyUnicode_TransformDecimalToASCII(unicode, length);
}
-/* Ignore use of deprecated APIs */
-_Py_COMP_DIAG_PUSH
-_Py_COMP_DIAG_IGNORE_DEPR_DECLS
-
static PyObject *
unicode_legacy_string(PyObject *self, PyObject *args)
{