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.

Title: test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop
Type: Stage: resolved
Components: Tests Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, vstinner
Priority: normal Keywords: patch

Created on 2019-11-21 08:10 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17314 merged vstinner, 2019-11-21 08:12
PR 17319 merged miss-islington, 2019-11-21 11:54
Messages (3)
msg357142 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-21 08:10
bpo-35983 added new tests to test_capi: test_capi now takes 1 minute 31 seconds :-( Previously, test_capi only took 9.5 seconds!

commit 351c67416ba4451eb3928fa0b2e933c2f25df1a3
Author: Jeroen Demeyer <>
Date:   Fri May 10 19:21:11 2019 +0200

    bpo-35983: skip trashcan for subclasses (GH-11841)
    Add new trashcan macros to deal with a double deallocation that could occur when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base class and that base class uses the trashc
an mechanism.
    Patch by Jeroen Demeyer.

Attached PR modify these two tests to require the "cpu" resource. So by default, tests are not run and test_capi takes again 9.5 seconds instead of 1 min 30 sec.

Note: Travis CI runs the test suite using -uall,-cpu.
msg357161 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-21 11:54
New changeset 0127bb1c5c3286f87e284ff6083133bfdcfd5a4f by Victor Stinner in branch 'master':
bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)
msg357164 - (view) Author: miss-islington (miss-islington) Date: 2019-11-21 12:11
New changeset 767b42633bb7ac39dd6743d8dd7f5b5cc122acea by Miss Islington (bot) in branch '3.8':
bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 83056
2019-11-21 12:15:10vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-11-21 12:11:47miss-islingtonsetnosy: + miss-islington
messages: + msg357164
2019-11-21 11:54:28miss-islingtonsetpull_requests: + pull_request16806
2019-11-21 11:54:07vstinnersetmessages: + msg357161
2019-11-21 08:12:35vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request16801
2019-11-21 08:10:35vstinnercreate