This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients corona10, phsilva, shihai1991, vstinner
Date 2020-05-14.17:03:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589475825.45.0.304369150178.issue40137@roundup.psfhosted.org>
In-reply-to
Content
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.na92@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.
History
Date User Action Args
2020-05-14 17:03:45vstinnersetrecipients: + vstinner, phsilva, corona10, shihai1991
2020-05-14 17:03:45vstinnersetmessageid: <1589475825.45.0.304369150178.issue40137@roundup.psfhosted.org>
2020-05-14 17:03:45vstinnerlinkissue40137 messages
2020-05-14 17:03:45vstinnercreate