Skip to content

Doc/c-api: type PyInterpreterState claims GIL is shared between subinterpreters #138644

@Oberon00

Description

@Oberon00

Documentation

It seems the C API documentation for type PyInterpreterState still specifies the state before PEP 684 – A Per-Interpreter GIL / before Python 3.12:

The global interpreter lock is also shared by all threads, regardless of to which interpreter they belong.

This is wrong and if relied upon can lead to wrong behavior, especially relevant with the subinterpreters module added in 3.14 but in principle seems worth fixing in all Python versions from 3.12.

Adding a "Changed in version 3.12" infobox would be ideal.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesdocsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions