diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-09-12 10:27:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 10:27:50 (GMT) |
commit | 92bf8691fb78f3484bf2daba836c416efedb1d8d (patch) | |
tree | f5e605dbb607ec58daa687300a5f59f99dd1aee4 /Modules/_sqlite/clinic/row.c.h | |
parent | 5277ffe12d492939544ff9c54a3aaf448b913fb3 (diff) | |
download | cpython-92bf8691fb78f3484bf2daba836c416efedb1d8d.zip cpython-92bf8691fb78f3484bf2daba836c416efedb1d8d.tar.gz cpython-92bf8691fb78f3484bf2daba836c416efedb1d8d.tar.bz2 |
bpo-43413: Fix handling keyword arguments in subclasses of some buitin classes (GH-26456)
* Constructors of subclasses of some buitin classes (e.g. tuple, list,
frozenset) no longer accept arbitrary keyword arguments.
* Subclass of set can now define a __new__() method with additional
keyword parameters without overriding also __init__().
Diffstat (limited to 'Modules/_sqlite/clinic/row.c.h')
-rw-r--r-- | Modules/_sqlite/clinic/row.c.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_sqlite/clinic/row.c.h b/Modules/_sqlite/clinic/row.c.h index 310d62b..c936ef7 100644 --- a/Modules/_sqlite/clinic/row.c.h +++ b/Modules/_sqlite/clinic/row.c.h @@ -13,7 +13,8 @@ pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) pysqlite_Cursor *cursor; PyObject *data; - if ((type == clinic_state()->RowType) && + if ((type == clinic_state()->RowType || + type->tp_init == clinic_state()->RowType->tp_init) && !_PyArg_NoKeywords("Row", kwargs)) { goto exit; } @@ -53,4 +54,4 @@ pysqlite_row_keys(pysqlite_Row *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_row_keys_impl(self); } -/*[clinic end generated code: output=0382771b4fc85f36 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9d54919dbb4ba5f1 input=a9049054013a1b77]*/ |