classification
Title: const kwlist for PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords
Type: security Stage: resolved
Components: C API Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder: PyArg_ParseTupleAndKeywords doesn't take const char *keywords[]
View: 21011
Assigned To: Nosy List: immortalplants, r-barnes, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-06-12 01:21 by r-barnes, last changed 2021-06-12 07:02 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26686 closed immortalplants, 2021-06-12 01:25
Messages (2)
msg395674 - (view) Author: Richard Barnes (r-barnes) * Date: 2021-06-12 01:21
PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords currently accept `kwlist` as `char **`; however, is not modified by either function. Therefore, a `const char **` might be better since this allows calling code to take advantage of `const` safety.
msg395680 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-06-12 07:02
This is a duplicate of issue21011.

We cannot change this because it breaks C API.
History
Date User Action Args
2021-06-12 07:02:12serhiy.storchakasetstatus: open -> closed

superseder: PyArg_ParseTupleAndKeywords doesn't take const char *keywords[]

nosy: + serhiy.storchaka
messages: + msg395680
resolution: wont fix
stage: patch review -> resolved
2021-06-12 01:25:33immortalplantssetkeywords: + patch
nosy: + immortalplants

pull_requests: + pull_request25274
stage: patch review
2021-06-12 01:21:56r-barnescreate