Skip to content

Rename Python::with_gil -> with_python ? #3987

@davidhewitt

Description

@davidhewitt

An idea with the upcoming free threaded Python around the corner.

Maybe instead of Python::with_gil, a future PyO3 API can just be pyo3::with_python. No functional difference except dropping the GIL name as that won't always be relevant.

e.g.

Python::with_gil(|py| /* do stuff */)

becomes just

with_python(|py| /* do stuff */)

Maybe we include with_python in the prelude, maybe we invite users to import it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions