Skip to content

Warning about remaining subinterpreters should suggest using of concurrent.interpreters.Interpeter #141509

@sergey-miryanov

Description

@sergey-miryanov

Bug report

Bug description:

finalize_subinterpreters checks if remaining subinterpreters are present and if so suggest to destroy them via destroy method of internal _interpreters module. I propose to change the warning message to use Interpeter.close as it less confusing.

cpython/Python/pylifecycle.c

Lines 2642 to 2648 in 2fbd396

/* Warn the user if they forgot to clean up subinterpreters. */
(void)PyErr_WarnEx(
PyExc_RuntimeWarning,
"remaining subinterpreters; "
"destroy them with _interpreters.destroy()",
0);

@ZeroIntensity @ericsnowcurrently What do you think?

If yes, I'm ready to fix this.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions