summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-07-17 05:23:37 (GMT)
committerGitHub <noreply@github.com>2022-07-17 05:23:37 (GMT)
commit107c21c5d56682320b38c01b5575c1604a429239 (patch)
tree928924bae5395e98aae74891f298451741e4e3f5 /Python
parent30f28ac296e506b336e0ab56c41422a53c36d0c2 (diff)
downloadcpython-107c21c5d56682320b38c01b5575c1604a429239.zip
cpython-107c21c5d56682320b38c01b5575c1604a429239.tar.gz
cpython-107c21c5d56682320b38c01b5575c1604a429239.tar.bz2
gh-94864: Fix PyArg_Parse* with deprecated format units "u" and "Z" (GH-94902)
It returned 1 (success) when warnings are turned into exceptions.
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index a2ea4d7..d7ba9a1 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1017,7 +1017,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
{
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
"getargs: The '%c' format is deprecated. Use 'U' instead.", c)) {
- return NULL;
+ RETURN_ERR_OCCURRED;
}
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS