cpython icon indicating copy to clipboard operation
cpython copied to clipboard

PyMemberDef members are not marked up

Open encukou opened this issue 1 year ago • 4 comments

The members of PyMemberDef aren't marked up as members, so they can't be linked to individually.

encukou avatar Oct 05 '22 15:10 encukou

Reserving for a student. Everyone else, please don't start on this issue this week.


You will want to click “Show Source” on the page linked in the first comment. That will take you to the place you need to edit on GitHub.

You will also want to read the Devguide, for info like how to build the documentation with your changes: https://devguide.python.org/documentation/start-documenting/

An example of how members should be documented is in PyType_Spec: https://docs.python.org/3/c-api/type.html#c.PyType_Spec

encukou avatar Oct 12 '22 09:10 encukou

@encukou I would like to work on this issue. Thanks for the hint!

Johnny11502 avatar Oct 12 '22 10:10 Johnny11502

@encukou Just to let you know, I did not forget about this issue and I have just been a bit busy at work this week. I will try and submit my PR tonight or tomorrow.

Johnny11502 avatar Oct 14 '22 14:10 Johnny11502

@encukou I am a bit confused about what needs to be marked up as a member under PyMemberDef. I looked at PyType_Spec and saw how PyType_Spec.name and the members that follow were documented but I do not see what would need it for this issue. Would you please be able to specify the lines or text that needs to be corrected.

Johnny11502 avatar Oct 14 '22 18:10 Johnny11502

The members (fields) are name, type, offset, etc. Currently they're defined in a table, so they don't show up when searching the docs for PyMemberDef.name (and when writing the docs, can't be linked using :c:member`PyMemberDef.name`). The table should be converted to entries for the individual members.

encukou avatar Oct 17 '22 13:10 encukou

Got it, thanks!

Johnny11502 avatar Oct 17 '22 16:10 Johnny11502

PyGetSetDef is in the same situation, let's use this issue for that as well.

encukou avatar Oct 24 '22 14:10 encukou

@encukou I can update the members of PyGetSetDef as well since it would pretty much be the same if you don't mind.

Johnny11502 avatar Oct 24 '22 17:10 Johnny11502

Sounds good, thanks!

encukou avatar Oct 24 '22 17:10 encukou

Please do not convert the T_* macros (T_SHORT etc.), though. I'm making bigger changes in that area.

encukou avatar Oct 24 '22 20:10 encukou