Skip to content

Nested profiling with cProfile raises exception in Python 3.12. #110770

Closed as not planned
vivarium-collective/vivarium-core
#241
@manueljacob

Description

@manueljacob

Bug report

Bug description:

import cProfile

p1 = cProfile.Profile()
p1.enable()

p2 = cProfile.Profile()
p2.enable()

In Python 3.11 this used to pass, but in Python 3.12 the last line raises “ValueError: Another profiling tool is already active”.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions