I changed my mind and I’m now a supporter of PEP 820
It took me a while but I now see the PEP 820 advantages: it enhances the backward compatibility and the stable ABI.
PEP 820 avoids the need to add new PyType_FromXXX() functions when new members/slots are added thanks to the ability to define some slots on the heap memory, and some others as static data. It helps with backward compatibility, before new functions were not available on old Python versions preventing to import the extension module.
PEP 820 enhances the backward compatibility by allowing to skip new slots on an old Python version using the PySlot_OPTIONAL flag. It’s useful for the stable ABI: a single binary works on multiple Python versions.
There are some other nice features, not really needed but good to have:
- Unique namespace for slot identifiers (instead of 2 before: type and module slots).
- Type safety: replace
void*with anunion.