summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-17 05:46:43 (GMT)
committerGitHub <noreply@github.com>2022-07-17 05:46:43 (GMT)
commit31608abf55839f5fa9cce33d530e35ea6e0ad427 (patch)
tree62a4602f64467c9475a8b66b9be0e4310ab0f136 /Python/getargs.c
parent964431eaeb1905a95cb1bd745d0b9c0052db4b94 (diff)
downloadcpython-31608abf55839f5fa9cce33d530e35ea6e0ad427.zip
cpython-31608abf55839f5fa9cce33d530e35ea6e0ad427.tar.gz
cpython-31608abf55839f5fa9cce33d530e35ea6e0ad427.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. (cherry picked from commit 107c21c5d56682320b38c01b5575c1604a429239) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index d5e0835..92fc0af 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1016,7 +1016,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