| :const:`Py_TPFLAGS_MANAGED_WEAKREF` instead of ``tp_dictoffset`` and | ||
| ``tp_weaklistoffset``, respectively. | ||
| The use of ``tp_dictoffset`` and ``tp_weaklistoffset`` is still | ||
| supported, but will not fully support multiple inheritance |
There was a problem hiding this comment.
| supported, but will not fully support multiple inheritance | |
| supported, but does not fully support multiple inheritance |
I was a little surprised by the tense here, but I also may be wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
You are right.
Because this doesn't apply right now, I unthinkingly use the future tense.
Sorry, something went wrong.
| pass | ||
| class B2(Both1, cls): | ||
| class B2(C4, cls): | ||
| pass |
There was a problem hiding this comment.
Should we also assert that the mro of these classes looks correct?
Sorry, something went wrong.
There was a problem hiding this comment.
This won't change the mro. That's determined by the C3 algorithm. https://en.wikipedia.org/wiki/C3_linearization
Sorry, something went wrong.
| Classes declaring :const:`Py_TPFLAGS_MANAGED_DICT` should call | ||
| :c:func:`_PyObject_VisitManagedDict` and :c:func:`_PyObject_ClearManagedDict` | ||
| to traverse and clear their instance's dictionaries. | ||
| To clear weakrefs, call :c:func:`PyObject_ClearWeakRefs`, as before. |
There was a problem hiding this comment.
Should the extension docs be updated to provide examples of using the new API? (Probably as a separate PR...)
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, they should. I also plan to add a new file documenting the new object layout.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.