From 610a60c601fb4380eee30e15be1cd4dcbdaeec4c Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 18 Jun 2020 17:30:53 +0900 Subject: bpo-36346: Add Py_DEPRECATED to deprecated unicode APIs (GH-20878) Co-authored-by: Kyle Stanley Co-authored-by: Victor Stinner (cherry picked from commit 2c4928d37edc5e4aeec3c0b79fa3460b1ec9b60d) --- Python/getargs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Python/getargs.c') diff --git a/Python/getargs.c b/Python/getargs.c index 774242828e..d4a531a5ef 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1070,6 +1070,9 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, case 'u': /* raw unicode buffer (Py_UNICODE *) */ case 'Z': /* raw unicode buffer or None */ { + // TODO: Raise DeprecationWarning +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **); if (*format == '#') { @@ -1109,6 +1112,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, arg, msgbuf, bufsize); } break; +_Py_COMP_DIAG_POP } case 'e': {/* encoded string */ -- cgit v1.2.1