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, erlendaasland, petr.viktorin, phsilva, shihai1991, vstinner
Date 2022-01-21.16:31:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642782680.58.0.628917370926.issue46417@roundup.psfhosted.org>
In-reply-to
Content
> bpo-46417: Revert remove_subclass() change (GH-30750)

Ok, this change fixed buildbots.

I saw code in typeobject.c which uses a borrowed reference to tp_subclasses with a loop which can modify tp_subclasses. This code should be modified to hold a strong reference to tp_subclasses while accessing it.

The test_mock_add_spec() test of test_unittest modifies the subclasses of many types and so is indirectly a stress tests for code accessing tp_subclasses. That's why the regression was only seen in this specific test.
History
Date User Action Args
2022-01-21 16:31:20vstinnersetrecipients: + vstinner, phsilva, petr.viktorin, corona10, shihai1991, erlendaasland
2022-01-21 16:31:20vstinnersetmessageid: <1642782680.58.0.628917370926.issue46417@roundup.psfhosted.org>
2022-01-21 16:31:20vstinnerlinkissue46417 messages
2022-01-21 16:31:20vstinnercreate