mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)
Since Python 3.12, PyUnicode_READY() does nothing and always returns 0. Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).
This commit is contained in:
parent
146939306a
commit
cbb9ba844f
35 changed files with 37 additions and 321 deletions
8
Modules/_sqlite/clinic/connection.c.h
generated
8
Modules/_sqlite/clinic/connection.c.h
generated
|
@ -966,9 +966,6 @@ pysqlite_connection_execute(pysqlite_Connection *self, PyObject *const *args, Py
|
|||
_PyArg_BadArgument("execute", "argument 1", "str", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
if (PyUnicode_READY(args[0]) == -1) {
|
||||
goto exit;
|
||||
}
|
||||
sql = args[0];
|
||||
if (nargs < 2) {
|
||||
goto skip_optional;
|
||||
|
@ -1008,9 +1005,6 @@ pysqlite_connection_executemany(pysqlite_Connection *self, PyObject *const *args
|
|||
_PyArg_BadArgument("executemany", "argument 1", "str", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
if (PyUnicode_READY(args[0]) == -1) {
|
||||
goto exit;
|
||||
}
|
||||
sql = args[0];
|
||||
parameters = args[1];
|
||||
return_value = pysqlite_connection_executemany_impl(self, sql, parameters);
|
||||
|
@ -1665,4 +1659,4 @@ exit:
|
|||
#ifndef DESERIALIZE_METHODDEF
|
||||
#define DESERIALIZE_METHODDEF
|
||||
#endif /* !defined(DESERIALIZE_METHODDEF) */
|
||||
/*[clinic end generated code: output=834a99827555bf1a input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=d3c6cb9326736ea5 input=a9049054013a1b77]*/
|
||||
|
|
8
Modules/_sqlite/clinic/cursor.c.h
generated
8
Modules/_sqlite/clinic/cursor.c.h
generated
|
@ -65,9 +65,6 @@ pysqlite_cursor_execute(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t
|
|||
_PyArg_BadArgument("execute", "argument 1", "str", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
if (PyUnicode_READY(args[0]) == -1) {
|
||||
goto exit;
|
||||
}
|
||||
sql = args[0];
|
||||
if (nargs < 2) {
|
||||
goto skip_optional;
|
||||
|
@ -107,9 +104,6 @@ pysqlite_cursor_executemany(pysqlite_Cursor *self, PyObject *const *args, Py_ssi
|
|||
_PyArg_BadArgument("executemany", "argument 1", "str", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
if (PyUnicode_READY(args[0]) == -1) {
|
||||
goto exit;
|
||||
}
|
||||
sql = args[0];
|
||||
seq_of_parameters = args[1];
|
||||
return_value = pysqlite_cursor_executemany_impl(self, sql, seq_of_parameters);
|
||||
|
@ -319,4 +313,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return pysqlite_cursor_close_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=1f82e3c9791bb9a5 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=831f7bc5256526d3 input=a9049054013a1b77]*/
|
||||
|
|
5
Modules/_sqlite/clinic/module.c.h
generated
5
Modules/_sqlite/clinic/module.c.h
generated
|
@ -133,9 +133,6 @@ pysqlite_register_converter(PyObject *module, PyObject *const *args, Py_ssize_t
|
|||
_PyArg_BadArgument("register_converter", "argument 1", "str", args[0]);
|
||||
goto exit;
|
||||
}
|
||||
if (PyUnicode_READY(args[0]) == -1) {
|
||||
goto exit;
|
||||
}
|
||||
orig_name = args[0];
|
||||
callable = args[1];
|
||||
return_value = pysqlite_register_converter_impl(module, orig_name, callable);
|
||||
|
@ -211,4 +208,4 @@ skip_optional:
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=39d38c6cfc455042 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=e08e6856ae546e7b input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue