- Remove the MRO walker, PyType_DefiningTypeFromSlotFunc, as it was
found it can give wrong results when a type's special methods are
changed (which can be done from Python code).
Solving the issue is deferred to a future PEP (and/or perhaps a
private CPython function).
- Split public C-API from CPython implementation details. It turns out
that alternate C-API implementations have grown more important
since 2016, if only for experimenting with possible optimizations.
- Add potentially confusing terms "Defining Class" and "C-API" to the
terminology section.
- Mention that ht_module is not inherited by subclasses.
- Remove modules to be ported initially: zipimport (since rewritten
in Python), _io and _cvs (need module state from slot methods).
* Mention __class__ cell, expand slot methods in Future extensions
And fix a typo.
* report TypeError rather than SystemError when bad types are passed
to new APIs
* add PyType_FromModuleAndSpec to the list of new functions
* wrap text at 80 columns
* add C API docs links for thread-local storage and context variables
* note in abstract that only the initial state lookup from slots is
inherently slow, with subsequent lookups being amenable to caching
* other minor wording tweaks
* Remove stray reference to `ht_moduleptr`
* Update copyright info
* Remove the new slot for offsets
* Remove note on removed internal functions
* Remove stray reference to Py_TPFLAGS_HEAP_IMMUTABLE
* Rewrite section on passing the "defining class" into C methods.
* Remove proposal for immutable heap exception types. Let's leave those to another PEP
* Restrict METH_METHOD to a single calling convention.
This calling convention should be efficient, so also reduce the Optimization section.
* Set names in monospaced font
* Use `nargsf` for the vectorcall "number of args + flag" argument
* Link "per-module state" to the terminology section
* Adjust link to Marcel's current implementation
* Other minor rewordings
https://github.com/python/peps/pull/1159