mirror of
https://github.com/python/cpython.git
synced 2026-02-13 19:04:37 +00:00
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 107c21c5d5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
964431eaeb
commit
31608abf55
3 changed files with 16 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue