This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Update documented signatures of tp_get/setattr
Type: Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: 25701 Superseder:
Assigned To: docs@python Nosy List: docs@python, martin.panter, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-11-22 11:53 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
typeobj-sigs.patch martin.panter, 2016-11-22 11:53 review
typeobj-sigs.v2.py2.patch martin.panter, 2016-11-24 02:36
Messages (5)
msg281468 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-11-22 11:53
https://docs.python.org/3.7/c-api/typeobj.html#c.PyTypeObject.tp_getattr

tp_getattr and tp_setattr take a non-const char pointer in their signatures, but the documentation points to PyObject_GetAttrString() etc which were changed to take const char pointers a long time ago: revision 2f19b981ac24.

This patch fixes the documentation of those two methods for Python 3. There could be more fixes needed for Python 2.
msg281599 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-11-24 02:36
In Python 2, charbufferproc was changed to use non-const char ** in revision dba6494735d0 (perhaps by accident). Otherwise, this patch is the same as for Python 3. I have added a sentence about using NULL for deletion in the patch.
msg281600 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-11-24 02:40
Python 2 patch is on top of the patch for Issue 25701
msg282124 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-01 01:33
New changeset 2fd070fa6c15 by Martin Panter in branch '2.7':
Issue #28771: Correct documentation of signatures using const
https://hg.python.org/cpython/rev/2fd070fa6c15
msg282831 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-10 06:11
New changeset 5d51ac0be72a by Martin Panter in branch '3.5':
Issue #28771: Update tp_get/setattr signature documentation
https://hg.python.org/cpython/rev/5d51ac0be72a

New changeset ee8c8b79d1d5 by Martin Panter in branch '3.6':
Issue #28771: Merge C API doc fix from 3.5
https://hg.python.org/cpython/rev/ee8c8b79d1d5

New changeset c4865975b804 by Martin Panter in branch 'default':
Issue #28771: Merge C API doc fix from 3.6
https://hg.python.org/cpython/rev/c4865975b804
History
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72957
2016-12-10 06:55:34martin.pantersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-12-10 06:11:14python-devsetmessages: + msg282831
2016-12-01 01:33:16python-devsetnosy: + python-dev
messages: + msg282124
2016-11-24 02:40:29martin.pantersetdependencies: + Document that tp_setattro and tp_setattr are used for deleting attributes
messages: + msg281600
2016-11-24 02:36:45martin.pantersetfiles: + typeobj-sigs.v2.py2.patch

messages: + msg281599
2016-11-22 12:13:52serhiy.storchakasetnosy: + serhiy.storchaka
2016-11-22 11:53:08martin.pantercreate