Skip to content

Many tests leak references in 3.11 and 3.12, such has test_cgitb: "Speed up Traceback object creation" regression #111947

Closed
@vstinner

Description

@vstinner

The backport to 3.11 and 3.12 branches of the issue gh-109181 fix introduced reference leaks.

The following tests fail when run with -R 3:3:

15 tests failed:
    test.test_concurrent_futures.test_process_pool
    test.test_inspect.test_inspect
    test.test_multiprocessing_fork.test_processes
    test.test_multiprocessing_forkserver.test_processes
    test.test_multiprocessing_spawn.test_processes test_capi
    test_cgitb test_exception_group test_exceptions test_idle test_pdb
    test_raise test_sys test_threading test_traceback

They don't leak in the main branch who got the same change.

In the 3.12 branch, the leak was introduced by commit 4f619e8:

commit 4f619e83fe1416c9b8d618533a0aaec0b4443b11
Author: Pablo Galindo Salgado <Pablogsal@gmail.com>
Date:   Tue Oct 31 18:18:11 2023 +0000

    [3.12] gh-109181: Speed up Traceback object creation by lazily compute the line number (GH-111548) (#111551)
    
    .
    (cherry picked from commit abb15420c11d9dda9c89f74eac8417240b321109)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions