Ronald Oussoren <ronaldousso...@mac.com> added the comment:
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). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43054> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com