STINNER Victor <vstin...@python.org> added the comment:
I consider that all things that could be done have already been done, so I close the issue. Thanks for Hai and Dong-hee who helped ;-) > * _functools: Py_CLEAR(kwd_mark); is commented in _functools_free() Sadly, PEP 573 implementation is not complete enough to use it in _functools: see PR 20055. > * _abc: abc_invalidation_counter Fixed in bpo-40566 by: commit 77c614624b6bf2145bef69830d0f499d8b55ec0c Author: Dong-hee Na <donghee.n...@gmail.com> Date: Sat May 9 17:31:40 2020 +0900 bpo-40566: Apply PEP 573 to abc module (GH-20005) > scanner_traverse(), scanner_clear(), encoder_traverse() and encoder_clear() tp_clear slot cannot get the defining type (PEP 573 may be extended later to allow that). Using PyType_GetModule(Py_TYPE(self)) to access types stored in the module state and then compare Py_TYPE(self) to these types... looks badly broken :-) If we get the wrong type, PyType_GetModule(Py_TYPE(self)) will return the wrong module and so we cannot get the json state from the wrong module... It's a chicken-and-egg issue :-) I think that it's not worth it to attempt to add back these assertions. It's very unlikely to get the wrong types in practice. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40137> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com