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.

Author ronaldoussoren
Recipients Mark.Shannon, gvanrossum, petr.viktorin, ronaldoussoren, vstinner
Date 2021-02-28.09:49:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614505798.18.0.280275379424.issue43054@roundup.psfhosted.org>
In-reply-to
Content
Sorry about the slow response.

I misread your initial message, the distinction between (1) and (2) in your list is clear.

to (3): New fields can be added while maintaining API (but not ABI) compatibility as long as the default value is the default value for static initialisers (assuming the usual way we initialise structs in CPython). That is, adding a new field to PyTypeObject is ok, as long as it at the end and defaults to NULL or 0.

Especially with category 1 it is not entirely clear which structs are in that category. Is PyLongObject in this category?  The struct is not documented, but has a name that seems to indicate that it is public.   Likewise for PyTupleObject, where the shape of the struct is used by documented APIs but the shape of the strut itself is not documented.

BTW. For my own code I do directly access structs where necessary, even if they aren't documented. I totally expect that this will require adjustments for new Python releases (such as when the unicode representation changed).
History
Date User Action Args
2021-02-28 09:49:58ronaldoussorensetrecipients: + ronaldoussoren, gvanrossum, vstinner, petr.viktorin, Mark.Shannon
2021-02-28 09:49:58ronaldoussorensetmessageid: <1614505798.18.0.280275379424.issue43054@roundup.psfhosted.org>
2021-02-28 09:49:58ronaldoussorenlinkissue43054 messages
2021-02-28 09:49:57ronaldoussorencreate